-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleted docs disregarded for if_seq_no check #50526
Deleted docs disregarded for if_seq_no check #50526
Conversation
Previously, as long as a deleted version value was kept as a tombstone, another index or delete operation against the same id would leak that the doc had existed (through seq_no info) or would allow the operation if the client forged the seq_no (which in principle could be a dirty read). Fixed to disregard info on deleted docs when doing optimistic concurrency check.
Pinging @elastic/es-distributed (:Distributed/Engine) |
UpdateSettingsIT used seq_no to validate index.gc_deletes. This is no longer possible (with this PR) and we instead use external versioning, which seems to be the only valid use case for triggering on tombstones. SimpleVersioningIT was fixed since a conditional delete against a deleted doc now fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The fix makes sense to me. Thanks Henning. How did you find this issue (just curious)?
Thanks for reviewing @dnhatn
I was helping debugging a REST test where a conditional index operation failed with a message saying that the current seq-no was different from the if-seq-no. This led us down a path of investigating why the doc was updated, but it turned out it was indeed deleted. I opened this PR primarily to avoid that confusion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Previously, as long as a deleted version value was kept as a tombstone, another index or delete operation against the same id would leak that the doc had existed (through seq_no info) or would allow the operation if the client forged the seq_no. Fixed to disregard info on deleted docs when doing seq_no based optimistic concurrency check.
Thanks for the reviews, Nhat and Yannick. |
Previously, as long as a deleted version value was kept as a tombstone, another index or delete operation against the same id would leak that the doc had existed (through seq_no info) or would allow the operation if the client forged the seq_no. Fixed to disregard info on deleted docs when doing seq_no based optimistic concurrency check.
Previously, as long as a deleted version value was kept as a tombstone,
another index or delete operation against the same id would leak that
the doc had existed (through seq_no info) or would allow the operation
if the client forged the seq_no. Fixed to disregard info on deleted docs
when doing seq_no based optimistic concurrency check.
AFAICS the use of the tombstones/gc_deletes period is only relevant to
external versioning.