cnauroth commented on PR #1942:
URL: https://github.com/apache/zookeeper/pull/1942#issuecomment-1299598419

   @eolivelli , @symat or @anmolnar , would you please review?
   
   As discussed in JIRA issue 
[ZOOKEEPER-4460](https://issues.apache.org/jira/browse/ZOOKEEPER-4460), the 
ZooKeeper codebase currently contains an override of `Thread#getId()`, which 
will be incompatible with OpenJDK Project Loom, targeted to Java 19. I've taken 
the approach of renaming `QuorumPeer#getId()` to `QuorumPeer#getMyId()`, 
consistent with documented terminology for the ID assigned to a peer in a 
quorum. From what I can tell, it was never intentional to override 
`Thread#getId()`. It was just a logical choice for a method name in a class 
that coincidentally also `extends Thread`.
   
   `QuorumPeer` is a server-side class that isn't part of a public API, so we 
don't need to preserve backward compatibility. As a safety measure, I reviewed 
the code for [Apache Curator](https://github.com/apache/curator), where I 
suspected there might be a deeper integration with ZooKeeper internals for 
testing infrastructure. Even in Curator, I didn't find any calls to 
`QuorumPeer#getId()`.


-- 
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]

Reply via email to