-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql/kv: block queries with more than productionKVBatchSize batches from being serviced by bounded staleness #69063
Copy link
Copy link
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
Before #69062, families with randomise in logic tests. This sometimes causes a multiple-batch fetch (when the batch size is >= productionKVBatchSize batches, 1 in logic tests) in pkg/sql/row/kv_batch_fetcher.go, which calls NegotiateAndSend twice. As a result, we would hit the txn commit timestamp must not be fixed assertion in checkNegotiateAndSendPreconditions.
It feels like we should exit out of the bounded staleness read if we detect this, or opt-out cross-column family bounded staleness reads.
Reproduction steps: #69063 (comment)
I can't get a consistent reproduction of this; reverting #69062 and running while make testccllogic FILES='as_of'; do :; done locally on my mac will fail within 10-20 runs on this line:
| SELECT * FROM t AS OF SYSTEM TIME with_max_staleness('1ms') WHERE i = 2 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.