This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 1060b4c785 Fixing the stale pinot ServerInstance in
_tableTenantServersMap (#11386)
1060b4c785 is described below
commit 1060b4c785105790cbef5d1e661eb8bce1fccb64
Author: Xiang Fu <[email protected]>
AuthorDate: Sat Aug 19 14:57:12 2023 -0700
Fixing the stale pinot ServerInstance in _tableTenantServersMap (#11386)
---
.../java/org/apache/pinot/broker/routing/BrokerRoutingManager.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/pinot-broker/src/main/java/org/apache/pinot/broker/routing/BrokerRoutingManager.java
b/pinot-broker/src/main/java/org/apache/pinot/broker/routing/BrokerRoutingManager.java
index 5ea2ea5373..788ed9e365 100644
---
a/pinot-broker/src/main/java/org/apache/pinot/broker/routing/BrokerRoutingManager.java
+++
b/pinot-broker/src/main/java/org/apache/pinot/broker/routing/BrokerRoutingManager.java
@@ -837,8 +837,12 @@ public class BrokerRoutingManager implements
RoutingManager, ClusterChangeHandle
Map<String, ServerInstance> tenantServerMap = entry.getValue();
- if (!tenantServerMap.containsKey(instanceId) &&
tags.contains(tableServerTag)) {
+ if (tags.contains(tableServerTag)) {
+ // ServerInstance might got updated for internal fields like
queryServicePort, queryMailboxPort, etc,
+ // so always update the tenantServerMap with the latest serverInstance
tenantServerMap.put(instanceId, serverInstance);
+ } else {
+ tenantServerMap.remove(instanceId);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]