Skip to content

Commit

Permalink
adjust log msg and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bohhyang committed Nov 21, 2024
1 parent 6ef56f2 commit a063056
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -862,10 +862,11 @@ public void setEventEmitter(ServiceDiscoveryEventEmitter emitter) {

@Override
public void emitSDStatusActiveUpdateIntentAndWriteEvents(String cluster, boolean isMarkUp, boolean succeeded, long startAt) {
// since SD event is sent in IndisAnnouncer for INDIS-write-only, inside ZookeeperAnnouncer, any calls to
// "emitSDStatusActiveUpdateIntentAndWriteEvents" should only happen when _server is an instance of
// ZooKeeperServer (which means it only emits the event when it's doing zk-only or dual write).
if (!(_server instanceof ZooKeeperServer))
// In this class, SD event should be sent only when the announcing mode is to old service registry or dual write,
// so we can directly return when _server is NOT an instance of ZooKeeperServer or the announcement mode is dynamic
// new SR only.
if (!(_server instanceof ZooKeeperServer)
|| _server.getAnnounceMode() == LoadBalancerServer.AnnounceMode.DYNAMIC_NEW_SR_ONLY)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ else if (!uris.Uris().contains(uri))
}
else
{
warn(_log, _store, " marked down for cluster ", clusterName, "with uri: ", uri);
warn(_log, _store, " marked down for cluster ", clusterName, " with uri: ", uri);
Map<URI, Map<Integer, PartitionData>> partitionData = new HashMap<>(2);
partitionData.put(uri, Collections.emptyMap());
_store.removePartial(clusterName, new UriProperties(clusterName, partitionData), callback);
Expand Down

0 comments on commit a063056

Please sign in to comment.