storage: don't require consensus for no-op requests#24345
storage: don't require consensus for no-op requests#24345craig[bot] merged 3 commits intocockroachdb:masterfrom
Conversation
|
Reviewed 8 of 8 files at r1. pkg/storage/replica.go, line 2887 at r1 (raw file):
Perhaps take a moment to clarify that a non-nil Ah, I see you have a comment to this effect in pkg/storage/replica.go, line 2897 at r1 (raw file):
l pkg/storage/replica.go, line 2990 at r1 (raw file):
2 sounds like it would imply 1, though the stats fixing is likely the exception. Name that example, I think it's illuminating. pkg/storage/replica.go, line 3157 at r1 (raw file):
Make sure to update the comment on pkg/storage/replica_test.go, line 8723 at r1 (raw file):
Good to know. pkg/storage/engine/batch.go, line 117 at r1 (raw file):
Comments from Reviewable |
I had a build fail with: ``` should omit type error from declaration of var QueryCanceledError; it will be inferred from the right-hand side ``` I'm not sure why this wasn't caught earlier. Release note: None
30dda78 to
cc0b1de
Compare
|
TFTR! Review status: 0 of 9 files reviewed at latest revision, 6 unresolved discussions. pkg/storage/replica.go, line 2897 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Did you mean to say something here? pkg/storage/replica.go, line 2990 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/storage/replica.go, line 3157 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/storage/replica_test.go, line 8723 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Yeah, I knew you'd like that one 😃 pkg/storage/engine/batch.go, line 117 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
This isn't actually an implementation of the interface, so I went with a comment that matched the other comments here. Comments from Reviewable |
|
Reviewed 1 of 9 files at r2, 5 of 8 files at r3, 3 of 3 files at r4. Comments from Reviewable |
|
Reviewed 9 of 9 files at r2, 8 of 8 files at r3, 3 of 3 files at r4. pkg/storage/replica.go, line 2897 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
No, my track pad is broken and randomly clicks and if that happens while I'm typing a comment I let reviewable do things I can't trace after. pkg/storage/engine/batch.go, line 117 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Comment here looks the same, but it's only a nit anyway. I mostly thought this sentence sounded odd. Comments from Reviewable |
Fixes cockroachdb#23942. During evaluation, a request can result in having no effect for a variety of reasons. For instance, a PushTxnRequest may arrive at a transaction record to find that it is already ABORTED, in which case there's nothing for it to do. Before this change, we were still requiring that these empty results be proposed through Raft. This change fixes this by detecting empty results and bypassing consensus completely. Release note (performance improvement): Write requests that result in no-ops are no longer proposed through Raft.
Release note: None
|
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. pkg/storage/engine/batch.go, line 117 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. Comments from Reviewable |
cc0b1de to
feaee5c
Compare
|
bors r=tschottdorf |
24309: optbuilder: Fix bugs with subqueries, DISTINCT, and ORDER BY r=RaduBerinde a=rytaft This commit fixes several miscellaneous issues. 1. Subqueries with aggregation and without a `FROM` clause were causing the outer query to incorrectly act as if it were in a grouping context. This commit fixes the issue by making sure the scope of the subquery is different than the scope of the outer query. 2. Queries with `DISTINCT` and `ORDER BY` in which the `ORDER BY` was ordering on an expression that was also part of the `SELECT` list were failing. This commit fixes the issue by reusing the existing projection for the `ORDER BY` column. 3. Several redundant columns were previously being synthesized for identical expressions. This commit fixes the issue by reusing existing columns wherever possible. Release note: None 24345: storage: don't require consensus for no-op requests r=tschottdorf a=nvanbenschoten Fixes #23942. During evaluation, a request can result in having no effect for a variety of reasons. For instance, a PushTxnRequest may arrive at a transaction record to find that it is already ABORTED, in which case there's nothing for it to do. Before this change, we were still requiring that these empty results be proposed through Raft. This change fixes this by detecting empty results and bypassing consensus completely. Release note (performance improvement): Write requests that result in no-ops are no longer proposed through Raft.
Build succeeded |
Fixes #23942.
During evaluation, a request can result in having no effect for a variety
of reasons. For instance, a PushTxnRequest may arrive at a transaction
record to find that it is already ABORTED, in which case there's nothing
for it to do.
Before this change, we were still requiring that these empty results be
proposed through Raft. This change fixes this by detecting empty results
and bypassing consensus completely.
Release note (performance improvement): Write requests that result in
no-ops are no longer proposed through Raft.