-
Notifications
You must be signed in to change notification settings - Fork 3.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
kv: batch double committing #46374
Comments
For continuity, this was discussed and diagnosed in this thread: #46017 (comment). The problem is that a batch with reads and writes is split at the DistSender level ( |
Naive question: Are these the same issue? That link is to two parts of a split batch committing at different timestamps. This is one key (so one part) committing twice at two different timestamps. |
Oh, you're right, I misunderstood the issue and thought it was the same as #46081. At least on the surface, this does seem to be a separate issue. It doesn't seem to be explained by the problem discussed in that link, but interestingly it would be addressed by the solution from there if this truly only occurs with Puts and Gets present in the same batch. This would be an interesting thread for @OwenQian to pull on once we get more clarity on #45586. |
@nvanbenschoten is this still a thing? |
I have not seen this since. #46081 is still a thing, but I'll close this. |
With the following diff on top of
8eff499cc20cd4b8e6e35b985405d16d22f7cbdb
(HEAD is also fine assuming the diff applies cleanly.) We trigger theinvariant violation: value v-<foo> was written by two operations
assertion in kvnemesis. kvnemesis only writes each value 1 time, but this assertion shows that it came out of rangefeed twice.The following logs happen to show it interleaving with another operation that wrote to the same key, but I've seen cases where this didn't happen (so the value and the prev value of the rangefeed log line are the same). It only seems to happen when a
kv.Batch
is committed withkv.DB.Run
and only when there are both Puts and Gets present in the batch.This repros very quickly (seconds) with
make stress PKG=./pkg/kv/kvnemesis TESTS=TestKVNemesisSingleNode
.Found by kvnemesis.
The text was updated successfully, but these errors were encountered: