Skip to content

Order of watch events happening in the same revision in the same watcher is not documented #19736

Answered by serathius
socketpair asked this question in Q&A
Discussion options

You must be logged in to vote

Experiment says, that the order of watched events is the same as it was in TXN block. But if it is not said in the docs then it may be changed in the future (i.e. implementation specific). Strictly speaking, since keys in TXN success (or TXN failure) block can not intersect, order of operations does not have any meaning.

You are exactly right. Order is based on order of operation in TXN and it should not matter due to lack of intersection.

I don't know, possibly order of records in watcher may be changed after compaction.

After compaction it should not matter as you no longer can access/watch from this revision. Still if you looked under the hood, you would find that etcd assigns TXN …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by socketpair
Comment options

You must be logged in to vote
2 replies
@siyuanfoundation
Comment options

@socketpair
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #19731 on April 11, 2025 08:06.