[
https://issues.apache.org/jira/browse/ZOOKEEPER-3566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16943220#comment-16943220
]
Samuel Nelson commented on ZOOKEEPER-3566:
--
I understand that watches aren't designed to receive all events. I think it's
still important for watches to know which `zxid` triggered them so events that
_are_ received can at least be ordered.
> Send event zxid to watches
> --
>
> Key: ZOOKEEPER-3566
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3566
> Project: ZooKeeper
> Issue Type: Improvement
> Components: server
>Reporter: Samuel Nelson
>Priority: Major
>
> The zxid that triggered a watch should be sent to the watch because it's
> useful for ordering events.
>
> Use case:
> I'm watching a znode and syncing its contents (and whether it has been
> deleted) to a third system. Without zxid attached to events it makes it very
> difficult to maintain the order of events as they happened in ZK.
>
> For example if I modify node `/a/b/c` and then delete it soon after, we have
> two watch events, but no reliable way to communicate to our third system that
> the modification happened before the deletion. If we are given the zxid we
> can use that to order events.
>
> Suggested implementation:
> Change `IWatchManager#triggerWatch` to take another parameter `Long zxid`.
> Callers pass the zxid of the event.
> Add member `Long zxid` to `WatchedEvent`
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)