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 2020/07/04 07:20:31 UTC

[GitHub] [zookeeper] maoling edited a comment on pull request #1391: ZOOKEEPER-3526: data inconsistency due to mistaken TRUNC caused by maxCommittedLog is much less than minCommittedLog when in readonly mode

maoling edited a comment on pull request #1391:
URL: https://github.com/apache/zookeeper/pull/1391#issuecomment-653732591


   - A quick comment. IIRC, my fix for this issue few days ago is like this: (maybe I'm missing something)
   ```
   # ReadOnlyZooKeeperServer#startup
   setZxid(zkDb.getDataTreeLastProcessedZxid());
   super.startup();
   ```
   - For my understanding, the `hzxid` inited with 0 and never be reassigned with last processed `zxid` in that situation. We should think the following question: 
        - When a follower changes to leader, why we don't have this issue? 
        - Is it because that `ZooKeeperServer` instance reloads the `zkDataBase` and assigns `hzxid` with last processed `zxid`?
       - We can take an example of the code of `NIOServerCnxnFactory#startup`, how a `ZooKeeperServer` instance reloads its state space from a failure, then `setups RequestProcessors` to server the requests?
    
   - Put `hzxid` as a param of `ZooKeeperServer` constructor is not a good idea?
   


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

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