You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2022/11/02 05:34:19 UTC

[GitHub] [zookeeper] cnauroth commented on pull request #1942: ZOOKEEPER-4460: QuorumPeer overrides Thread.getId with different sema…

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: notifications-unsubscribe@zookeeper.apache.org

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