andrasbeni commented on PR #19503:
URL: https://github.com/apache/pulsar/pull/19503#issuecomment-1431492852

   @lhotari, @eolivelli, the goal of this change is to allow a broader range of 
third-party MetadataStore implementations to back Pulsar.
   As I can see, the MetadataStore abstraction evolved from how Pulsar used 
ZooKeeper. Other implementations (Memory, RocksDB) were done with this API in 
mind and without constraints from an underlying store. In the case of Etcd, it 
was possible to adjust the behavior to be compatible with ZK by subtracting 1 
from the version. But I see this as a compromise because the version of a 
KeyValue is not unique. (The same version can happen twice for the same key if 
it was deleted and recreated in the meantime.) The mod_revision field would 
have been a safer choice to implement compare-and-swap operations, but it did 
not follow ZK’s versioning scheme.
   This change allows Pulsar to later switch to mod_revision in the case of 
Etcd and use stores where compare-and-swap is only allowed using fields similar 
to it.


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