You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/03/06 11:13:18 UTC

[GitHub] [zookeeper] maoling commented on issue #262: ZOOKEEPER-2789: Reassign `ZXID` for solving 32bit overflow problem

maoling commented on issue #262: ZOOKEEPER-2789: Reassign `ZXID` for solving 32bit overflow problem
URL: https://github.com/apache/zookeeper/pull/262#issuecomment-470068746
 
 
   @asdf2014 
    look at the latest patch,any solution for backward compatibility ?
   - for backward compatibility, the version info of zk server who generates this zxid may be carried in the zxid?
   - the design of current zxid benefits from generating a global unique incremental id, however also subject to this.
   - look at the desigin of etcd for your reference and inspiration,her main-revision is 64 bits which is not mixed up with any info of epoch/term.
   
   ```
   // A revision indicates modification of the key-value space.
   // The set of changes that share same main revision changes the key-value space atomically.
   type revision struct {
   	// main is the main revision of a set of changes that happen atomically.
   	main int64
   	 
   	// sub is the the sub revision of a change in a set of changes that happen
   	// atomically. Each change has different increasing sub revision in that
   	// set.
   	sub int64
   }        
   ```

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


With regards,
Apache Git Services