skoppu22 commented on code in PR #332:
URL: https://github.com/apache/cassandra-sidecar/pull/332#discussion_r3015265927


##########
server/src/main/java/org/apache/cassandra/sidecar/cdc/CdcManager.java:
##########
@@ -207,20 +209,18 @@ public void stopConsumers()
         consumers.forEach(SidecarCdc::stop);
     }
 
-    private Integer getInstanceId(String instanceIp)
+    @VisibleForTesting
+    Integer getInstanceId(String instanceIp)
     {
-        for (InstanceMetadata instance : instanceFetcher.allLocalInstances())
+        try
         {
-            String configuredIpAddress = instance.ipAddress();
-
-            // Option 1a: Normalize both to InetAddress and compare
-            if (resolveToSameAddress(instanceIp, configuredIpAddress))
-            {
-                return instance.id();
-            }
+            return instanceFetcher.instance(instanceIp).id();

Review Comment:
   Looks like resolveToSameAddress is no longer called by any prod code after 
this change, and can be removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to