Repository navigation
test(itest): cover the immediate read-then-write upgrade - #297
Merged
Merged
Conversation
The URL-mode test held the lock after a read but never upgraded the read to a write, which is the failure mode the mode exists for. Add the read, the waiting writer, the transaction's own insert and commit, and verify both rows.
Performance benchmarkBase Driver-side microbenchmarks only; server and network time are excluded. Shared-runner noise is about ±10%, so only larger regressions are flagged. JDK 25.0.5, Linux amd64, 4 CPUs. Throughput
Allocation
Workloads and thresholds live in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Issue #294's acceptance asks for a read-then-write transaction with
immediatethat commits while a second connection waits. #295 shipped the URL parameter and a test that the immediate begin holds the write lock, but not the read-to-write upgrade itself.What changed
urlImmediateTransactionModeUpgradesAReadToAWriteAndCommitsWhileAWriterWaitstoTransactionModeIT. It reads, starts a second connection whose insert must time out behind the lock, inserts and commits in the first transaction, then checks both rows and that the waiting writer completed.Scope
Verification
TransactionModeITruns 3 tests against sqld v0.24.33, all passing.spotless:checkpasses.