You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by "seekskyworld (via GitHub)" <gi...@apache.org> on 2026/01/14 08:29:30 UTC

[PR] ZOOKEEPER-5011: Guard FileTxnSnapLog usage after close [zookeeper]

seekskyworld opened a new pull request, #2346:
URL: https://github.com/apache/zookeeper/pull/2346

   Issue: https://issues.apache.org/jira/browse/ZOOKEEPER-5011
   
   Summary:
   - add a closed-state guard so stale references throw an IllegalStateException instead of NPEs
   - keep close idempotent and avoid marking the instance closed during truncateLog reopen
   - add coverage for save-after-close and idempotent close
   
   Motivation:
   - improve diagnostics when stale ZooKeeperServer references hit FileTxnSnapLog after shutdown
   
   Validation:
   - C:\Users\jiahao.deng\scoop\apps\maven3\current\bin\mvn.cmd -pl zookeeper-server -Dtest=FileTxnSnapLogTest test


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


Re: [PR] ZOOKEEPER-5011: Guard FileTxnSnapLog usage after close [zookeeper]

Posted by "maoling (via GitHub)" <gi...@apache.org>.
maoling commented on PR #2346:
URL: https://github.com/apache/zookeeper/pull/2346#issuecomment-3983357023

   > To reproduce:
   > 1. Application code obtains a reference to `ZooKeeperServer` (e.g., `server = factory.getZooKeeperServer()`)
   > 2. ...................................................................................................
   
   Are you using an embedded ZooKeeperServer for in-JVM testing? If so, that might be why you're seeing this. This issue is typically not reproducible in a real-world cluster deployment?


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