merlimat commented on PR #19503:
URL: https://github.com/apache/pulsar/pull/19503#issuecomment-1439279206
@eolivelli @lhotari
The change is to remove a restriction that is not anyway relevant to the
usage that Pulsar is doing of metadata.
We're not relying anywhere on the fact that `version=0` means a record was
just created. This restriction gets in the way of supporting other metadata
backends where the versioning is different.
We could also argue that this change is made necessary by a not ideal API in
MetadataStore (modeled on the way we used ZK API).
* After `store.put()`, we are checking if the record was modified or newly
created.
* If it was created, we trigger an "artificial" notification event to
invalidate the cache, such that it's kept consistent
I don't think it's strictly necessary to do so, though it's probably a good
idea to maintain that.
Regarding the `isFirstVersion`, I believe it's the least invasive way of
breaking the forced association "version=0 --> created".
Another way could be to add a `modifiedCount` in `Stat` that would contain
the number of times a record has been modified after its creation.
--
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]