gharris1727 commented on code in PR #14089:
URL: https://github.com/apache/kafka/pull/14089#discussion_r1273821447


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginDesc.java:
##########
@@ -115,6 +115,10 @@ public int compareTo(PluginDesc<T> other) {
         int versionComp = encodedVersion.compareTo(other.encodedVersion);
         // isolated plugins appear after classpath plugins when they have 
identical versions.
         int isolatedComp = Boolean.compare(other.loader instanceof 
PluginClassLoader, loader instanceof PluginClassLoader);
-        return nameComp != 0 ? nameComp : (versionComp != 0 ? versionComp : 
isolatedComp);
+        // choose an arbitrary order between different classloaders and types
+        int loaderComp = loader.hashCode() - other.loader.hashCode();

Review Comment:
   As far as I can tell, the PluginClassLoader is already using the 
identityHashCode internally, so I don't think this makes collisions any more or 
less likely.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to