Skip to content

fix(transact): rank index-key faults and handle the ClientRequestToken as the service does - #853

Open
LeeroyHannigan wants to merge 52 commits into
mainfrom
fix/transact-index-key-order
Open

LeeroyHannigan wants to merge 52 commits into
mainfrom
fix/transact-index-key-order

Conversation

@LeeroyHannigan

@LeeroyHannigan LeeroyHannigan commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Changes since the last review

The last review is jcshepherd's of 20 November, at 98ed152. These commits came after it:

What

This PR follows #416. It makes TransactWriteItems rank its key faults and the ClientRequestToken as the service does, on all four backends. It also keeps the token of a cancelled request as the service keeps it. The rules, as measured on the service:

  1. The backend checks the keys that the request supplies before it checks the token and before it applies a member. These checks are the type of a table key, the index keys of a Put item, and the type of an Update's literal operand. The first such fault in request order decides the answer, and the token stays unused.
  2. Then the first empty index-key value in request order decides. An Update can supply that value as a literal or write it from the item. In one statement the literal comes first. A member whose condition fails writes nothing.
  3. A request that the backend cancels after rule 1 keeps its token. Another request with the same token gets IdempotentParameterMismatchException, and the backend does not apply it. The same request runs again.
  4. Every cancellation after rule 1 keeps the token. That covers an empty or wrong-typed index-key value and a failed condition on any member. It also covers an Update past 400 KB, an action that cannot apply, and TransactionConflict. Another request with the token gets the mismatch 570 seconds after the last cancellation, and the backend applies it 600 seconds after it. A cancellation of the same request sent again starts that time again. A committed token stays used as long, and the same request sent again 11 minutes after its commit runs again.
  5. A send can meet another send of the same request that still runs. It gets TransactionInProgressException "Transaction from previous request is still in progress", or it waits and gets the answer of that send. The service applies such a request once.

The changes:

  • transact_first_empty_literal in extenddb-storage finds the first Update member with an empty literal. Each backend runs only the members before that member and puts the literal's reason at its position. resolve_key_faults then decides from the reasons, as before.
  • Each backend runs transact_op_key_checks over every member before it checks the token.
  • After a cancellation that comes after rule 1, each backend rolls back the writes. Then it stores the token with its fingerprint prefixed by cancelled:. No request fingerprint has that prefix. StoredToken::of tells a replay, a rerun and a mismatch apart, and the schema does not change. Cassandra no longer deletes the token on these paths. It writes the cancelled token with an LWT, as it writes the token row everywhere else. The LWT updates the running row, or inserts a row if the running row expired during the send. The write has a TTL of 600 seconds. So the token stays used for 10 minutes from the last cancellation, as on the other backends.
  • The stored cancelled token gets the time of the last cancellation, so a cancellation of the same request starts the 10 minutes again. MongoDB replaces a token document older than 10 minutes.
  • Every cancellation after rule 1 stores the cancelled token. That includes the PostgreSQL conflict paths outside the member loop and the MongoDB TransactionConflict after the last attempt. If that write fails, the backend logs the failure, and the request still gets its cancellation.
  • On SQLite and PostgreSQL, if the rollback after such a cancellation fails, the request gets HTTP 500 InternalServerError. Main dropped the transaction and answered the cancellation. Neither the items nor the token row change.
  • On Cassandra, the token row holds running: and the fingerprint while a send runs, and the plain fingerprint after the send commits. Another send of the same request that reads a running row gets TransactionInProgressException. So does a send that loses the reservation or the take of the token. Before, such a send got a replay of a write that had not happened, or the mismatch. The new StorageError::TransactionInProgress maps to that exception. The reservation and the take write the row with a TTL of 600 seconds. So a send that fails after them leaves its running row for 10 minutes.
  • TransactionInProgressException carries its message under the key Message, as the service sends it (measured on 19 November 2026). message_key in crates/core/src/error/mod.rs picks Message for it, as it does for TransactionCanceledException and IdempotentParameterMismatchException.
  • On PostgreSQL, two sends of one request with one token can reach the token check at the same moment (PostgreSQL: two sends of one TransactWriteItems with one ClientRequestToken at the same moment can both apply #851). The token insert of the second send waits on the token row of the first. When the first send commits, the select of the same statement reads a snapshot from before that commit. The check then runs its statement a second time. At READ COMMITTED, that statement reads the committed row. So the second send gets the replay, and a different request with the token at the same moment gets the mismatch. Two sends that take a token row older than 10 minutes also apply the request once. fix(storage-postgres): apply a TransactWriteItems once when two sends share a ClientRequestToken #873 brought this change into this branch.
  • A separate commit puts the same TTL on the Cassandra mark of a committed token. Before, the token of a committed request never expired on Cassandra. That commit can be dropped on its own. Then the texts on Cassandra token rows must change too: the comment of compute_fingerprint and the v1.2.0 entry of the upgrade manual.
  • One unit test pinned the order of two empty literals of different kinds in one statement. The service gave no fixed order for that shape, so the test now accepts either answer.
  • Three twi_conflict tests close a deadlock cycle through an outside transaction and expect PostgreSQL to abort the write transaction. PostgreSQL aborts the transaction whose deadlock check finds the cycle. Each waiter checks once, deadlock_timeout after it starts to wait. With the default on both sides, the check of the outside transaction could run first, so PostgreSQL aborted that transaction instead. One of the tests failed that way once in 54 runs of the file. The outside transaction now sets SET LOCAL deadlock_timeout = '5s', so the check of the write transaction runs first.

On PostgreSQL, an empty literal on a later member makes the members before it run, and they lock their rows. If another transaction holds one of those rows, the request waits, as any member does. The wait ends when the holder commits or rolls back, or when the deadlock detector breaks a cycle. The backend sets no lock_timeout on data transactions. When the literal is on the first member, the backend locks nothing.

Why

Closes #852.

jcshepherd's review of #416 on 28 October asked for one ranking of these faults on every backend. #416 merged on 3 November with the ranking it had before that review. The issue gives the measurements and the answers of main at 25ee109bf on each backend. The measurements are from 30 October, 31 October, 1 November, 4 November and 5 November 2026, with each request or token sequence sent twice.

The fix of #851 merged into this branch in #873.

Known differences

All four backends share the first four. This PR does not change the first three.

These answers of the service are not measured:

  • A Cassandra send reserves the token and then fails. This branch then answers the same request with TransactionInProgressException for 10 minutes.
  • A send meets a send of the same request that still runs, and the first send runs long. Two sends of a 100-member Put 50 ms apart both got OK and wrote the items once, but the first send had very likely finished.

Overlaps with other PRs

Testing done

676cf8f merges main at db8a90d. These runs used 676cf8f on 3 December 2026, with Rust 1.97.0 and the dev profile:

  • cargo fmt --all -- --check is clean. Both clippy commands of .github/workflows/clippy.yml with -D warnings are clean on the whole workspace. cargo +1.94.0 check --locked --all-targets on the eight crates that this PR changes is clean. 1.94.0 is the MSRV since fix(deps): move to sqlx 0.9.1 for the SQLite fix of RUSTSEC-2026-0459 #1166. The clippy step of .github/workflows/wasm.yml is clean. This host has no clang, so that run used a stand-in C compiler and archiver for the bundled SQLite. Clippy does not link.
  • Lib tests of the eight crates: core 1271 passed and 1 ignored, engine 982 passed, server 521 passed and storage 297 passed. SQLite 339 passed and 1 ignored, PostgreSQL 94 passed, MongoDB 197 passed and 88 ignored, and Cassandra 194 passed. The seven tests of storage-sqlite: the two write_lock_tests fail when an ancestor of the Cargo target directory is owned by another user #1414 fail on the test host: five server tests of backup_store and two SQLite tests of backup_catalog::write_lock_tests. uid 65534 owns /local/home, and their filesystem checks refuse a directory under it.
  • cargo test -p extenddb-wasm-adapter: its 3 unit tests and the parity corpus test pass. doc_version_literals passes (3).
  • cargo test -p extenddb-storage-postgres --tests --no-fail-fast against PostgreSQL 16 with pgvector, with EXTENDDB_TEST_PG_REQUIRED=1: 508 passed and 2 ignored, and twi_conflict passed 16 of 16. Five tests that open a filesystem backup store fail for the same reason on /local/home: three store_identity tests in backup_restore.rs and two tests in catalog_nul_backup_jobs.rs.
  • MongoDB, on a one-node mongo:7 replica set: data_engine::live_tests:: passed 23 of 23. Every test target of the crate, as the mongodb-rust job runs it (--tests -- --skip snapshot_engine:: with EXTENDDB_TEST_MONGODB_REQUIRED=1), gave 282 passed and 88 ignored.
  • Cassandra 4.1 with PasswordAuthenticator, as CI configures it: the 40 tests of direct_integration whose names hold transact_write, built with test-hooks, passed. They hold the transact_write_items:: and transact_write_tokens:: modules. The rest of the target did not run here. The Cassandra CI job runs all of it.
  • The four wire files of this PR, and main's tests/test_idempotency_account_scope.py and tests/test_transact_token_return_fields.py, against servers built from 676cf8f: 211 passed on SQLite (--no-default-features --features sqlite) and 211 passed on PostgreSQL. pytest --collect-only collects tests/ (7417 tests) and tests/python/ (820 tests) with no error.

62cea0c merges main at 3534c9e. On 62cea0c, cargo fmt --check is clean, and both clippy commands of .github/workflows/clippy.yml with -D warnings are clean on the whole workspace. The lib tests give core 1172 passed and 1 ignored, engine 891 passed and server 514 passed. On the test host, five server tests of backup_store fail, as on every branch, because uid 65534 owns /local/home. The four wire files of this PR and the token and transaction files of main listed below ran against a SQLite server built from 62cea0c. They gave 443 passed and 2 xfailed. The two xfails are main's TRANSACTION_INDEX_UNITS cases in tests/test_partiql_transaction.py. tests/python/test_transactions.py gives 16 passed. pytest --collect-only collects tests/ (6750 tests) and tests/python/ (672 tests) with no error. The wasm32 steps of .github/workflows/wasm.yml were not run locally. The WebAssembly CI job runs them.

c414410 merges main at 89fc971. The one new commit of main changes crates/storage-mongodb/tests/migrations_guards.rs, which this PR does not change. On c414410, cargo fmt --check is clean, and cargo clippy --all-targets -- -D warnings with the MongoDB test hooks is clean on extenddb-server and extenddb-storage-mongodb.

The runs below used 57f2e47, after the merge of main at 018715e. The lints and the lib tests ran again at 0958e28, the last commit of this round. That commit changes only a comment and the upgrade manual. Rust, on the eight crates that the PR changes:

  • cargo +1.97.0 fmt --all -- --check: clean.
  • cargo +1.97.0 clippy --locked --all-targets -- -D warnings, with each feature set of .github/workflows/clippy.yml: clean.
  • cargo +1.91.1 check --locked --all-targets (the MSRV): clean.
  • cargo +1.97.0 test --locked --lib: core 1157 passed, engine 886, server 514, storage 288, SQLite 329, PostgreSQL 87, MongoDB 190 (87 ignored) and Cassandra 181. On the test host, five server tests of backup_store and two SQLite tests of backup_catalog::write_lock_tests (storage-sqlite: the two write_lock_tests fail when an ancestor of the Cargo target directory is owned by another user #1414) fail. Their filesystem checks refuse a directory under an ancestor that neither root nor the test user owns. This PR does not change that code.
  • twi_conflict against PostgreSQL 16 (CI's pgvector/pgvector:pg16 image), with EXTENDDB_TEST_PG_REQUIRED=1, three runs: 16 of 16 passed in each run. Eight tests are new:
    • a_cancelled_token_is_used_for_ten_minutes_from_its_last_cancellation moves created_at back to check the 10 minutes and their restart.
    • a_conflict_cancellation_keeps_the_token_used_and_the_same_request_runs_again cancels a request with a token in a deadlock. Another request with the token then gets the mismatch, and the same request commits.
    • a_deadlock_after_an_empty_index_key_answers_the_empty_key checks that an empty key that a member writes from the item still decides when the next member deadlocks.
    • an_empty_literal_first_answers_without_waiting_on_later_locks checks that an empty literal on the first member answers while another transaction holds the next member's row.
    • two_sends_of_one_request_with_one_token_apply_it_once checks that the second send gets the replay (PostgreSQL: two sends of one TransactWriteItems with one ClientRequestToken at the same moment can both apply #851).
    • two_sends_that_run_a_cancelled_request_again_apply_it_once checks the replay for a cancelled request that two sends run again.
    • two_requests_with_one_token_at_once_apply_only_one checks that the second request gets the mismatch and applies nothing.
    • two_sends_that_take_an_old_token_row_apply_it_once checks the replay when the two sends take a token row older than 10 minutes.
  • The MongoDB data_engine::live_tests:: against a mongo:7 replica set: 21 of 21 passed. Two of them are new, and they move created_at back. They check the restart of the 10 minutes and the replaced document.
  • The Cassandra direct tests against cassandra:4.1: the transact_write_items:: tests (8, as on main) and the transact_write_tokens:: tests (7, all new) passed 15 of 15. The token tests passed 7 of 7 in a second run of their own. They are in tests/direct/transact_write_tokens.rs and its child module transact_write_tokens/concurrent_sends.rs:
    • One sends a wrong-typed table key, an empty literal and a failed condition with a token, and checks which of them keep the token used.
    • Three read the TTL of a cancelled token row, of a reservation and of a committed token row.
    • One writes a running row by hand.
    • One sends one request twice at once from two tasks, in 10 rounds of first sends and 10 rounds of a cancelled request. It accepts only the cancellation or TransactionInProgressException. In five earlier runs of its own, 38 or 39 of the 40 answers were the cancellation and the others TransactionInProgressException.
    • One changes the token row in two ways while a send of 40 Puts prepares. The cancellation leaves a row that another request reserved, and writes the cancelled token when the row is gone.

Wire tests, the four files of this PR, against a local server built from 57f2e47: tests/test_index_key_validation_on_update.py (64), tests/test_transact_index_key_cross_member.py (85), tests/test_transact_index_key_token.py (27) and tests/test_transact_write_conflict.py (3).

  • SQLite, built as CI's SQLite job builds it (--no-default-features --features sqlite): 179 passed.
  • MongoDB: 178 passed, 1 skipped.
  • On 20 November, a PostgreSQL server built from the production code of c25d75e gave 178 passed, 1 xfailed. A Cassandra server built from the production code of a6d6e1a gave 177 passed, 1 skipped, 1 xfailed.

The skipped case is the Update past 400 KB, which runs on SQLite and PostgreSQL only (#818, #761). In the runs of these files on 20 November and earlier, the xfailed case sends a cancelled request again with another ReturnConsumedCapacity (#514). It passes since the merge of #526, and 57f2e47 deletes its xfail marker.

The token and transaction files of main ran against the same two servers: tests/test_transact_token_return_fields.py (23), tests/test_error_message_key.py (4), tests/test_partiql_transaction.py (203), tests/test_idempotency_account_scope.py (5), tests/test_transaction_operations.py (31) and tests/python/test_transactions.py (16). On SQLite and on MongoDB, 280 passed and 2 xfailed. The two xfailed cases are the index unit cases of tests/test_partiql_transaction.py, which carry an xfail marker in main's file.

pytest --collect-only collects tests/ (6750 tests) and tests/python/ (672 tests) with no error.

Before 20 November, at earlier heads of this branch, a local release server per backend gave these results. The new rows are in tests/test_transact_index_key_cross_member.py (85 cases) and the new tests/test_transact_index_key_token.py (27 cases).

Backend The two files, main at 25ee109bf The two files, this branch test_index_key_validation_on_update.py, main at 25ee109bf The same, this branch
SQLite 56 of 112 failed 111 passed, 1 xfailed 4 of 64 failed 64 passed
PostgreSQL 56 of 112 failed 111 passed, 1 xfailed 4 of 64 failed 64 passed
MongoDB 66 of 112 failed 110 passed, 1 skipped, 1 xfailed 4 of 64 failed 64 passed
Cassandra 56 of 112 failed 110 passed, 1 skipped, 1 xfailed 4 of 64 failed 64 passed

At those heads, tests/test_transaction_operations.py (31) and tests/python/test_transactions.py (16) passed on every backend. The 33 test files that cover index keys and transactions gave these results:

Backend tests/ (26 files) tests/python/ (7 files)
SQLite 879 passed, 6 skipped, 1 xfailed 154 passed
PostgreSQL 879 passed, 6 skipped, 1 xfailed 154 passed
MongoDB 803 passed, 72 skipped, 9 xfailed, 2 xpassed 154 passed
Cassandra 810 passed, 75 skipped, 1 xfailed 154 passed

Before 20 November, two clients sent one request with one token to a Cassandra server at the same moment. There were 10 rounds of first sends and 10 rounds of a cancelled request, in each of two runs. On this branch every answer was the cancellation or TransactionInProgressException, and the item was never written. Main answered OK for that write in 1 to 8 of the 20 answers of a run, over three runs.

Mutants, one at a time, and the tests that fail on each. The three that change a Cassandra TTL or the commit mark ran at the head of this branch before 20 November. The mutants with a plain INSERT, and with no write when the token row is gone, ran after the merge of main at 2ef56139e. The others ran before the rebase onto 94b5f689b, which did not change the code they mutate. This round does not change the code that any of them mutates.

  • StoredToken::of gives the mismatch for a cancelled token of the same request: a_stored_token_is_a_replay_a_rerun_or_a_mismatch.
  • SQLite stores the token after a request-level fault: four cases of test_a_token_a_cancelled_request_used.
  • SQLite gives an internal error when the token write fails: a_failed_token_write_keeps_the_cancellation.
  • PostgreSQL stores no token after a deadlock in the member loop: a_conflict_cancellation_keeps_the_token_used_and_the_same_request_runs_again.
  • MongoDB stores no token after a cancellation: live_a_cancellation_keeps_the_token_used_from_its_last_cancellation.
  • Cassandra stores no cancelled token: test_a_cancelled_token_row_expires_ten_minutes_after_its_last_cancellation and test_idempotency_token_after_a_key_fault.
  • Cassandra writes the cancelled token with no TTL: test_a_cancelled_token_row_expires_ten_minutes_after_its_last_cancellation.
  • Cassandra writes the cancelled token with a plain INSERT: test_a_cancellation_leaves_a_token_row_that_changed_while_the_send_ran.
  • Cassandra writes no cancelled token when the token row is gone: test_a_cancellation_leaves_a_token_row_that_changed_while_the_send_ran.
  • Cassandra compares the fingerprints with == after a lost reservation, or gives a replay when the take loses: test_two_sends_of_one_request_answer_its_cancellation_or_in_progress.
  • Cassandra reserves the token with the plain fingerprint, not the running one: test_two_sends_of_one_request_answer_its_cancellation_or_in_progress.
  • Cassandra reserves the token with no TTL: test_a_reserved_token_row_expires_ten_minutes_after_its_reservation.
  • Cassandra never marks a committed token: test_idempotency_token_replay and test_a_committed_token_row_expires_ten_minutes_after_its_commit.
  • Cassandra marks a committed token with no TTL (the separate commit): test_a_committed_token_row_expires_ten_minutes_after_its_commit.
  • No test fails when PostgreSQL stores no token on its conflict paths outside the member loop. At READ COMMITTED those paths raise no conflict, and no test runs a stricter isolation.

This round's controls, on its own commits:

  • A change to the first sentence of the update-expression message of an empty index key fails index_key_empty_messages_by_context and an_empty_literal_on_an_index_key_is_refused_with_its_kind. The second test as it was before this round passes with that change, because it checked only the end of the message.
  • A change to the text of StorageError::TransactionInProgress fails transaction_in_progress_carries_the_service_message, a new engine test that checks the status, the error type and the message.
  • The Message arm of message_key as main has it, without TransactionInProgressException, fails the_message_key_follows_the_service_per_error. The body then has the keys __type and message.
  • The Cassandra test move is byte for byte. The two new files hold the lines of the earlier file in their order, except one blank line. They add only the child's header and the lines that declare the child module.

Against Amazon DynamoDB: the three test files of this branch (tests/test_index_key_validation_on_update.py, tests/test_transact_index_key_cross_member.py and tests/test_transact_index_key_token.py) ran at 73d5b3e on 5 November 2026 in us-east-1, and 176 passed. Since then, these files changed only in 57f2e47, which deletes the xfail marker of one case. That marker applied only when the files ran against ExtendDB.

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)
  • If this changes the wire protocol, Storage trait, auth model, on-disk
    format, or public CLI surface, an RFC has been accepted or is linked
    below. Otherwise, an ADR captures the decision (link below).

ADR / RFC: n/a. The change gives the answers that DynamoDB gives, and the token store keeps its schema. An older binary reads a cancelled token as a token that another request holds.

Breaking changes

  • A server of an earlier release reads a cancelled: row, and on Cassandra a running: row, as the token of another request. So after a downgrade, the same request answers IdempotentParameterMismatchException until the token expires.
  • On Cassandra, token rows that an earlier release wrote have no TTL and never expire. Only the rows written after the upgrade expire 10 minutes after their last write.

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

…eason on every backend

In a TransactWriteItems request an Update member can give a secondary-index key
a value of the wrong type in two ways: a literal operand in the request, or a
value computed from the stored item (an attribute reference, the fallback of
if_not_exists). The service ranks them differently across members, measured on
2026-10-30 in us-east-1 on two tables, every request sent twice:

- a wrong type supplied in the request (a table key, a Put item's index key, an
  Update's literal operand) cancels with ValidationError at that member and None
  at every other member, ahead of a failed condition and ahead of a computed
  wrong type elsewhere;
- otherwise an empty index key supplied in the request is a top-level
  ValidationException, in either member order, ahead of a computed wrong type
  and ahead of a failed condition elsewhere;
- otherwise each member keeps its own outcome, and a computed wrong type is a
  ValidationError at its member beside them: [ValidationError,
  ConditionalCheckFailed].

The SQLite, PostgreSQL and MongoDB transacted Update arms carried the computed
check as the internal key-type-mismatch reason, which the resolver treats as a
request fault, so a computed mismatch masked a failed condition on another
member ([ValidationError, None]) and outranked an empty key on another member
(a cancellation instead of the ValidationException); on MongoDB, which has no
pre-pass, it also outranked a Put item's empty key and a wrong-typed value
supplied on a later member. Cassandra already carried it as a plain
ValidationError and answered every measured row as the service does.

The three arms now carry the computed check as a plain ValidationError. The
resolver, its doc comment, the docs row and the test docstring state the rule
as measured; the earlier statement that any wrong-typed key masks every other
member holds only for a value supplied in the request. The pre-pass is
unchanged.

Tests: tests/test_transact_index_key_cross_member.py runs the 16 measured
two-member transactions and 5 single-request controls with their exact codes,
messages and the no-write check on SQLite, PostgreSQL, MongoDB and Cassandra.
Before this commit it fails A2, A2r, B1 and B1r on SQLite and PostgreSQL,
those four plus C1, C1r, F1 and F2 on MongoDB, and nothing on Cassandra; after
it, 21 pass on each. Three resolver unit tests cover the three kinds of fault
against each other in both orders.
…ared pass

Move the SQLite and PostgreSQL key checks into extenddb-storage as
transact_op_key_checks and transact_key_check_pass, and run the pass on all
four backends before any member is applied: SQLite and PostgreSQL where they
ran their own, MongoDB before its session transaction starts, Cassandra before
its ledger entry and PREPARE. resolve_key_faults now lets the first internal
key fault in request order decide. PostgreSQL's lock-conflict path resolves
its reasons too. is_key_fault had no caller and is removed.
…ross members

tests/test_transact_index_key_cross_member.py gains the 19 rows of the
2026-10-31 measurement that put a Put item's empty index key against a wrong
type supplied in the request (G rows), against an Update member's empty value
(H rows), and an Update member's empty value against a wrong-typed literal or
a failed condition (J rows), with the measured codes and messages and the
no-write check. On servers built from cef39cf90 the G rows with the Put item
first fail on all four backends, and G6r and H1 to H4 also fail on MongoDB and
Cassandra; on this branch all 40 cases pass on each backend.
…append and arithmetic by their result

An Update's empty index-key literal (SET k = :v, :v an empty string or
binary) is reported by the service on the statement, after the literal type
check and ahead of the condition, of an action that cannot apply and of a
wrong type computed from the item, on UpdateItem and in TransactWriteItems
(measured 2026-10-31, 15 requests). UpdateItem now checks it right after the
literal type check, in the engine and against the write's own index read on
PostgreSQL and SQLite. TransactWriteItems runs a second request-level pass,
transact_op_empty_literal_checks, over every member after the first and
before any member is applied; the first empty literal in request order
answers the top-level ValidationException. An empty value written from the
item or from the if_not_exists fallback is still found after the condition.

list_append always yields a list and arithmetic always a number, and the
service checks both on the statement whatever their operands read, so
literal_operand_type types them by their result; an attribute reference and
if_not_exists stay values written from the item.

The four tests of tests/test_index_key_validation_on_update.py that pinned an
empty literal after the condition or after an action that cannot apply now
expect the measured answer and are renamed for it. The twi_conflict deadlock
test keys its placeholder the way the parser does.
…cs row

tests/test_transact_index_key_cross_member.py gains the measured rows for an
Update's empty index-key literal on UpdateItem (s1 to s9) and in
TransactWriteItems (t1 to t6, K1, K1r), and for list_append that reads the
item, alone and beside every partner (L1 to L10, la1, la2). On servers built
from cef39cf90 the 75 cases fail 38 on SQLite and PostgreSQL and 43 on
MongoDB and Cassandra; on this branch all 75 pass on each backend. s8, s9,
K1r and the reversed G and H rows pass on cef39cf90 too and pin both orders.

The twi_conflict deadlock test now writes its empty value from the stored
item, since an empty literal is found before any row is locked. The
validation unit tests satisfy clippy. docs/differences-from-dynamodb.md
states the rules as measured and the shared differences with their issues.
…rvice does

PR #416 checks secondary-index keys on UpdateItem and in TransactWriteItems,
and its review asked that the four backends rank those faults across members
the same way. A measurement on the service on 1 November 2026, each request
and token sequence sent twice, found three rules that the four backends, with
the earlier commits of this branch, still answered differently.

Across members the first empty index-key value in request order decides,
whether an Update supplies it as a literal or writes it from the item:
[Update r SET sidx = e, Update b0 SET bidx = :eb] answers the first member's
empty string. The backends, with those commits, answered the second member's
empty binary literal, because they checked every member's literals before any
member ran. Now they find the first Update member with an empty literal, run
only the members before it, put the literal's reason at its position and
resolve the reasons as before. Within one statement the literal still comes
first, and a member whose own condition fails writes nothing, so its empty
if_not_exists fallback is never reported. With the literal on the first
member nothing runs. With it later, the members before it run, and on
PostgreSQL they lock their rows, so such a request waits on a row another
transaction holds, as any member does: until the holder commits or rolls
back, or the deadlock detector breaks a cycle.

The checks on keys supplied in the request (table key types, a Put item's
index keys, an Update's literal types) now run before the ClientRequestToken
is checked. A reused token beside such a fault answers the fault, and the
token stays unused.

A fault found after those checks (an empty literal, an empty or wrong-typed
value written from the item, a failed condition) now leaves the token used:
another request with it answers IdempotentParameterMismatchException and is
not applied, and the same request runs again. Each backend rolls the writes
back and then stores the token with its fingerprint prefixed "cancelled:",
which no request fingerprint carries, and StoredToken::of tells a replay, a
rerun and a mismatch apart. Cassandra no longer deletes the token on these
paths.

Two empty literals of different kinds in one statement had no fixed order on
the service, so the unit test that pinned one order now accepts either.

tests/test_transact_index_key_cross_member.py gains U3a, U3b, U3c, U3f and
U1a to U1c from that measurement, and the reverse list_append rows L4r, L9r
and L10r of the 31 October one (85 cases). The new
tests/test_transact_index_key_token.py sends its token sequences (20 cases).
On servers of main 25ee109 the two files fail 51 of the 105 cases on SQLite
and on PostgreSQL, 62 on MongoDB and 52 on Cassandra. On this branch all 105
pass on every backend, as do the 64 of
tests/test_index_key_validation_on_update.py. A twi_conflict test pins that
an empty literal on the first member answers without waiting on a later
member's lock, and a Cassandra direct test pins the token after a
request-level fault, an empty literal and a failed condition. The docs row
states the rules and the shared differences, three of them with their issues.
…ogress

Amazon DynamoDB keeps the ClientRequestToken of a cancelled
TransactWriteItems request used for 10 minutes from the last
cancellation. This was measured in us-east-1 on 2026-11-05, with each
sequence sent twice. A different request with the token answers
IdempotentParameterMismatchException 9 minutes after the cancellation
and runs 11 minutes after it. A cancellation of the same request sent
again starts the 10 minutes again. Every cancellation after the
request-level key checks keeps the token used. These include a failed
condition on a ConditionCheck, Delete, Put or Update member, an Update
that grows the item past 400 KB, an action that cannot apply, and
TransactionConflict. After a TransactionConflict the same request runs
again and commits. The service also got two sends of one request at the
same moment. It answered one with the request's answer and the other
with TransactionInProgressException "Transaction from previous request
is still in progress". In some rounds it answered both with the
request's answer. When two clients sent a request that commits at the
same moment, the service applied it once in each of 20 rounds.

The commit before this one keeps the token used after such a
cancellation, and left these differences:

- Cassandra wrote the cancelled token with no TTL, so the token stayed
  used with no end. It now writes the cancelled token with a TTL of 600
  seconds. The take of a cancelled token by its rerun writes the same
  TTL. So the token stays used for 10 minutes from the last
  cancellation, as on the other backends.
- SQLite, PostgreSQL and MongoDB kept the created_at of the first
  cancellation when the same request was cancelled again. The record of
  the cancelled token now sets created_at to the time of the
  cancellation. MongoDB also replaces a token document older than the
  10-minute read window, which $setOnInsert left in place.
- On Cassandra, the token row of a send held the request's fingerprint
  while the send ran. Another send of the same request could read the
  row. It then answered as a replay of a write that had not happened,
  also when the first send was then cancelled. The row now holds
  running:<fingerprint> while the send runs. The send writes the plain
  fingerprint when it commits and the cancelled fingerprint when it is
  cancelled. A send that reads a running row of its own request answers
  TransactionInProgressException.
- A Cassandra send that fails after the reservation leaves the running
  row, and so does a failed write of the plain fingerprint. The
  reservation and the take now write the row with a TTL of 600 seconds.
  So the same request answers TransactionInProgressException, and
  another request the mismatch, until the row expires 10 minutes after
  the reservation or the take. Before, such a row held the plain
  fingerprint with no TTL, and the same request answered as a replay
  with no end. The plain fingerprint of a committed request still has no
  TTL, so a committed token stays used with no end, as before.
- On Cassandra, a send could lose the reservation of the token to
  another send. It then compared the stored fingerprint with ==, so it
  answered the mismatch when the other send was cancelled. It now
  classifies the row as the read before the reservation does. A take
  that loses its LWT answers TransactionInProgressException, where it
  answered a replay. The new StorageError::TransactionInProgress maps to
  that exception.
- On SQLite, PostgreSQL and MongoDB, a failed write of the cancelled
  token after the rollback answered an internal error. The failure is
  now logged, and the request answers its cancellation.
- The PostgreSQL conflict paths outside the member loop released the
  token: the token check, the stream record, the index work and the
  commit. These paths raise no conflict at READ COMMITTED, the default
  isolation, and can raise one at a stricter isolation. The MongoDB
  TransactionConflict after the last attempt released the token too.
  They now record it as cancelled.

SQLite unit tests, a PostgreSQL twi_conflict test and MongoDB live tests
set created_at back to pin the 10 minutes and their restart. The MongoDB
tests also pin the replaced document. Cassandra direct tests read the
TTL of a cancelled token row and of a reservation. A twi_conflict test
pins the token after a deadlock: another request answers the mismatch,
and the same request commits. A Cassandra direct test sends one request
twice at once, in 10 rounds of first sends and 10 rounds of a cancelled
request. It accepts only the cancellation or
TransactionInProgressException. Another writes a running row by hand:
the same request answers TransactionInProgressException, and another
request answers the mismatch. A SQLite unit test makes the token write
fail and expects the cancellation.

tests/test_transact_index_key_token.py gets the rows of 5 November: an
Update past 400 KB, an action that cannot apply, failed conditions on
ConditionCheck, Delete and Put members, and the same request twice. It
also marks the ReturnConsumedCapacity row as an expected failure
(#514). The docs row states the rules of 5 November, the mismatch
message (#760) and #514. It also states PostgreSQL's answer to two sends
of one request at once (#851). It no longer states an order between the
400 KB check and the index-key checks, which no measurement shows.
Cassandra marks a committed ClientRequestToken of TransactWriteItems by
writing the request's plain fingerprint into its row of
idempotency_tokens_by_account. The write is an UPDATE ... IF fingerprint
= running:<fingerprint>, and it had no TTL.

The table has no default TTL, and the Cassandra
cleanup_expired_idempotency_tokens returns 0. The token check reads the
row without its created_at. So the token of a committed request stayed
used for as long as the row existed. At any time after the commit, the
same request sent again answered as a replay. A different request with
the token answered IdempotentParameterMismatchException.

Amazon DynamoDB keeps the token of a committed request used 9 minutes
after the request. It treats the token as new 11 minutes after the
request (measured in us-east-1 on 2026-11-05, each sequence sent twice).
SQLite, PostgreSQL and MongoDB keep a token for 10 minutes through its
created_at.

The commit mark now writes with USING TTL 600
(IDEMPOTENCY_TOKEN_TTL_SECONDS), as the reservation, the take and the
write of a cancelled token do. So every token row that this release
writes expires 10 minutes after its last write. A row that an earlier
release wrote has no TTL and stays. A send that fails before the mark
leaves the running row of its reservation or its take: that row expires
10 minutes after the write.

A direct test commits a Put with a token and reads TTL(fingerprint) of
its row as a value from 590 to 600 seconds.
Three twi_conflict tests close a deadlock cycle through an outside
transaction and expect PostgreSQL to abort the write transaction.
PostgreSQL aborts the transaction whose deadlock check finds the cycle,
and each waiter checks once, deadlock_timeout after it starts to wait.
The write transaction waits first. With the default of 1 second on both
sides, the two checks fall a few milliseconds apart. Under load the
outside transaction's check can then run first, and PostgreSQL aborts
the outside transaction instead. The test then fails. The token test of the conflict path failed
that way once in 54 runs of the file.

The outside transaction now runs SET LOCAL deadlock_timeout = '5s'. The
write transaction's check runs 1 second into its wait, with the cycle
closed. The outside transaction gets its lock when the write
transaction aborts. SET LOCAL ends with the transaction, so the pooled
connection keeps the server default. The role must be allowed to set
deadlock_timeout. The CI role postgres is a superuser.

At the SQL level, an outside session with a check at 100 ms was the
victim, and with 5 seconds the write session was. With the change, the
two deadlock tests passed 20 runs, the token test passed 20 runs and
the whole file passed 5 runs.
…re a token

On PostgreSQL, two sends of one TransactWriteItems request with one
ClientRequestToken at the same moment could both apply the request
(#851). The token check is one statement. It inserts the token row with
INSERT ... ON CONFLICT DO UPDATE ... WHERE in a WITH query, and it
selects the stored row with UNION ALL. The second send's insert waited
on the first send's uncommitted token row. When the first send
committed, the insert locked the committed row. Its WHERE was false, so
it returned no row. The select read with the snapshot that the statement
took before that commit, and it returned no row either. The request then
ran as a new one. On a PostgreSQL server built from the parent commit,
two clients sent [Update cnt SET n = n + :one] with one fresh token in
10 rounds. Both sends answered OK in every round, and n grew by 2 in 3,
8, 10, 10 and 10 rounds of five runs.

The same stale read gave the wrong answer when the token was stored as
cancelled. One of two sends of the same request took the cancelled row
and committed. The other read the cancelled row with its older snapshot
and answered IdempotentParameterMismatchException, the answer for a
different request.

In both cases the select read an older version of the row than the one
the insert locked. The insert's WHERE is false on the locked row, so
that row is less than 10 minutes old and is not this request's cancelled
row. A select that returns no row, or this request's cancelled row, has
therefore read an older version. For these two results the check now
runs the statement once more. At READ COMMITTED the second statement
takes a new snapshot, which holds the locked row. The first statement
keeps that row locked until the transaction ends, so the second
statement does not wait, and it reads the same row. A committed row of
the request answers as a replay. A row of another request answers the
mismatch.

Amazon DynamoDB applied such a request once in each of 20 rounds
(us-east-1, 2026-11-05, retries off). In 18 rounds one send answered OK
and the other TransactionInProgressException. In 2 rounds both sends
answered OK. So the second send answers TransactionInProgressException,
or waits and answers as the first send did. The PostgreSQL send has
waited for the commit when it reads the row, so it answers the replay.
A client that retries TransactionInProgressException gets the same
replay on its retry.

Two storage tests in twi_conflict.rs send a request twice at the same
moment, released by a barrier. Each test runs 20 rounds with a fresh
token per round. One test sends the request alone. The other first sends it with
the token while its condition fails. In each round n grows by 1, one
send commits, and the other answers the replay or TransactionInProgress.
On the parent commit, 13 to 18 of the 20 rounds failed in each of five
runs of each test. A wire test in test_transact_write_conflict.py sends
the request from two clients in 10 rounds. It requires that n grows by
1 and that each answer is OK or TransactionInProgressException, on every
backend and against the service. The docs row on index key validation
no longer lists the PostgreSQL difference.

Fixes #851.
…tale

check_idempotency_token_in_tx runs the token statement a second time
when the first one returns no row, or this request's cancelled row. At
READ COMMITTED, and with NOW() the same in both statements, the second
statement reads the row that the first statement locked. The check did
not test the second result. If the second statement also returned no
row, the request ran as a new one and applied a second time, as in
#851.

transact_write_items_impl opens its transaction with begin(), which
takes the default isolation level of the role or the database. The
check now answers TransactionInProgress when the second statement also
returns no row or this request's cancelled row, and it does not run the
request. The engine maps that error to TransactionInProgressException
("Transaction from previous request is still in progress"). Amazon
DynamoDB gave that answer in 18 of 20 rounds of two sends at once
(us-east-1, 2026-11-05). is_conflict_abort does not match the error, so
the transaction rolls back and the token row stays as the other send
stored it.
…d token row

The second token statement also fixes two races that the storage tests
did not cover. Two new tests in twi_conflict.rs run 20 rounds with a
fresh token per round. In each round they send two calls at the same
moment through a barrier.

two_requests_with_one_token_at_once_apply_only_one sends the same update
with one token and two fingerprints. In each round n grows by 1, one
call commits, and the other answers IdempotentMismatch or
TransactionInProgress.

two_sends_that_take_an_old_token_row_apply_it_once first stores a token
row of another request with a created_at 11 minutes ago. Then it sends
one request twice. The first send takes the old row. The first statement
of the second send reads the old row with its snapshot, and the
10-minute filter drops that row. In each round n grows by 1, one call
commits, and the other answers the replay or TransactionInProgress.

With tx_helpers.rs from the head of #853 (e1c6bba), both tests failed
in 3 of 3 runs. The first test failed in 15, 15 and 17 of the 20
rounds. The second test failed in 16, 16 and 17 of the 20 rounds. In
each failing round both calls committed and n grew by 2. On this branch
both tests passed in 3 of 3 runs. send_twice_at_once now takes one key
for each of the two sends.
The doc comment of check_idempotency_token_in_tx said that the
transaction runs at READ COMMITTED. transact_write_items_impl opens the
transaction with begin(), which takes the default isolation level of
the role or the database. The comment now says that the second
statement reads the locked row when the transaction runs at READ
COMMITTED. It also says that the check tests the second result for this
reason.
The doc comment of `record_cancelled_token` said that neither LWT
replaces a row that another send or request holds. The UPDATE applies to
any row that holds the request's running fingerprint. If a send runs
longer than the TTL of its row, a later send of the same request can
reserve the token with that fingerprint. The UPDATE of the first send can
then replace the running row of the later send. The comment now states
the condition of each LWT.

`apply_lwt` answers `Err` for every statement failure, a Paxos timeout
included, and the write can still apply after a timeout. The comment of
the `Err` arm now says that the token row stays as it was if the write
did not apply. The comment no longer lists what the row can hold, because
a later send of the same request can also leave a row. The log line no
longer says `(token row unchanged)`. `apply_lwt` already logs the
statement error with its context.
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

Thanks Joel. Point by point:

  1. LWT: b3b6d51 makes the cancellation write an LWT on the running fingerprint. When the send's row expired, 4a01560 stores the cancelled token with INSERT ... IF NOT EXISTS. So every write to the Cassandra token row now goes through Paxos. Details in the thread.
  2. Rollback failure on PostgreSQL and SQLite: the client gets InternalServerError on the paths that return the rollback error (the thread lists them). On those paths, neither the items nor the token row change. A retry with the same token runs the request again and gets its cancellation. No code change for this.
  3. Merge: 6555187 merges main at 2ef5613. Nothing conflicted, and git merged the six files that both sides changed with no overlap.

Also, b5e034c and 96fe994 move test code, unchanged, to files of their own. The Cassandra token tests go from transact_write_items.rs to a new transact_write_tokens.rs, so transact_write_items.rs is the same as on main again. Three test modules in SQLite and core move out of files that this branch grew past 600 lines. c25d75e shortens the token-check comment you asked about, and a6d6e1a restores the reason why the check tests the second result.

Main is at 44cd436, 13 commits after the last merge. No file has a
conflict. One file changed on both sides, and git merged it with no
overlap: tests/test_transact_write_conflict.py. In that file, #1148
sends the calls of the contention test through
call_with_handshake_retry. The token race test of this branch is in
another part of the file.
Main is at 6aef346, 2 commits after the last merge (#432 and #468).
No file has a conflict. Three files changed on both sides, and git
merged each of them with no overlap: docs/differences-from-dynamodb.md,
crates/storage/src/lib.rs and
crates/storage-cassandra/tests/direct_integration.rs. #468 adds a
Streams section to the differences page, a method to the StreamEngine
trait and a test module to the Cassandra direct tests. This branch
changes the index key validation row, the transact exports and the
token test module.
validate_index_key_not_empty and validate_index_key_empty_literals wrote
the same message text. Both now call update_expression_empty_key_message.

The empty-literal unit test compares the full message with assert_eq,
where it checked only the last sentence. For two empty literals of
different kinds in one statement, it accepts either full message, because
the service answered with either one (measured 2026-11-01).
…rage error

storage_err_to_dynamo wrote the text of StorageError::TransactionInProgress
a second time. It now uses the error's Display text, so the message has
one copy, in crates/storage/src/error.rs. A unit test pins the status,
the error type and the message that the service sends (measured
2026-11-19).
… transaction

The key-check pass and the empty-literal pass of transact_write_items
each built the IndexKeyRef list of a member's table again for every
member. Both passes now read one list per table, which the function
builds from the index schemas it fetched.
…on level

The comment on check_idempotency_token_in_tx said that a stricter
isolation level gives a second stale result. A probe on PostgreSQL 16
gave this instead. At READ COMMITTED, the second statement of the second
send reads the row that the first send committed. At REPEATABLE READ
and SERIALIZABLE, the first statement fails with SQLSTATE 40001, and
the backend cancels the request with TransactionConflict on every
member. The comment now says this and names #570. The
TransactionInProgress arm stays as a guard, so that a request does not
run twice if a second stale result comes.
The two sends of test_two_sends_of_one_request_with_one_token_apply_it_once
now go through call_with_handshake_retry, as #1148 did for the other race
test in tests/test_transact_write_conflict.py. The helper retries only a
handshake that fails before the client sends the request, so each send
still reaches the server once.
…ey row

The index key validation row of docs/differences-from-dynamodb.md now
names two backend differences that the PR description lists. On MongoDB,
a request whose token document is older than 10 minutes gets a
TransactionConflict cancellation until the TTL monitor removes the
document (#836). On Cassandra, a send that fails after it reserves the
token leaves its row, and the same request answers
TransactionInProgressException until the row expires (#837).
…file to a module of their own

tests/direct/transact_write_tokens.rs had 686 lines. Three tests move,
unchanged, to the child module transact_write_tokens/concurrent_sends.rs:

- a send that meets a running send of its request
- two sends of one request at once
- a token row that changes while a send runs

They use the file's helpers through `super::`. The file keeps the key
fault test, the three TTL tests and the helpers, in 410 lines. The child
has 294.
Main is at 018715e, 5 commits after the last merge (#503, #526, #690,
#765 and #774). No file has a conflict. One file changed on both sides,
and git merged it with no overlap: docs/differences-from-dynamodb.md.
#526 adds a Transactions section to it, and this branch changes the
index key validation row.

#526 puts the Return fields in the token fingerprint and gives
IdempotentParameterMismatchException the service's message. #774 picks
the message key per error. The commits after this merge bring the
branch in line with both.
This branch raises TransactionInProgressException, and main's
message_key sent it with the key message. The service sends it with
Message (raw bodies, us-east-1, 2026-11-19, two runs of eight
concurrent TransactWriteItems with one ClientRequestToken). The error
is now in the Message arm of message_key. A new row of
the_message_key_follows_the_service_per_error pins the key. The comment
of message_key no longer says that ExtendDB does not raise the error.
#526 gives IdempotentParameterMismatchException the service's message
and puts ReturnConsumedCapacity and ReturnItemCollectionMetrics in the
token fingerprint. The index key row of the differences page still
listed both as differences (#760 and #514). The two sentences are gone.

The Q7a case of tests/test_transact_index_key_token.py sends a cancelled
request again with ReturnConsumedCapacity TOTAL. Its xfail marker
expected an assertion failure on ExtendDB (#514). The case now passes,
so the marker is gone.
#526 says in the compute_fingerprint comment and in its upgrade manual
entry that Cassandra keeps a token with no expiry. On this branch every
write of a Cassandra token row has a TTL of 600 seconds. Only a row that
an earlier release wrote has no TTL. Both texts now say this. The
upgrade entry also says that after a downgrade, the tokens of this
release expire as on the other backends.
Main is at 89fc971, one commit after the last merge (#1280). It changes
crates/storage-mongodb/tests/migrations_guards.rs, which this branch does
not change. No file conflicted.
Main is at 3534c9e, one commit after the last merge (#1009, the
WebAssembly build). One file conflicted: crates/server/src/response.rs.
#1009 moved message_key, the function that picks the key of an error
message, from that file to crates/core/src/error/mod.rs, where the
shared error_document helper calls it. The merge takes main's
response.rs. It adds this branch's TransactionInProgressException arm
and its doc sentence to the moved function, so that error still
carries its message under Message (measured 2026-11-19).

crates/storage-sqlite/src/data/tx_helpers.rs merged with no overlap.
#1009 reads the clock there through web_time.
Main is at db8a90d. This branch last had main at 3534c9e (#1009).
Since then, 44 commits merged into main. Among them, #1514 released
v1.1.0 without this branch, and #1166 moved to sqlx 0.9.1.

Four files conflicted:

- crates/storage/src/lib.rs: #1449 exports VectorItemFilter beside the
  transact exports that this branch extends. The merge keeps both.
- crates/storage-mongodb/src/data_engine_live_tests.rs: #1446 declares
  its delete_table module where this branch declares token. The merge
  keeps both, main's first.
- crates/storage-postgres/tests/twi_conflict.rs: #1166 passes the SQL of
  the deadlock test through sqlx::AssertSqlSafe, and this branch takes
  the outside transaction from outside_transaction. The merge keeps the
  helper and the wrapper.
- docs/manuals/07-upgrade-manual.md: #1514 moved and rewrote the v1.1.0
  ClientRequestToken entry of #526. This branch changed the Cassandra
  sentence of the old copy. The merge keeps the entry as main has it.
  The text of this branch is now a v1.2.0 entry after the v1.2.0
  entries of main, because v1.1.0 shipped without this change.

sqlx 0.9 takes SQL that is not a &'static str only in
sqlx::AssertSqlSafe (#1166). The merge passes the SQL of the 11 queries
that this branch adds to twi_conflict.rs in it. The SQL text does not
change.

Git merged these files, which both sides change, at other lines:

- crates/core/src/error/mod.rs and crates/core/src/validation/mod.rs
- crates/engine/src/transact_write_helpers.rs and
  crates/storage/src/transact.rs
- tx_helpers.rs of PostgreSQL and SQLite, and
  crates/storage-postgres/src/data/update_item.rs
- the Cassandra direct_integration.rs and
  docs/differences-from-dynamodb.md

Since #1375, the engine stores a ClientRequestToken with each backslash
doubled and each U+0000 written \0 before a backend sees it. The token
code of this branch uses that stored form, as it used the token before.
Main is at 44a7b79, four commits past db8a90d: #1466, #1087, #768
and #1296. #1087 adds its v1.2.0 entry to
docs/manuals/07-upgrade-manual.md after the other v1.2.0 entries of
main, where this branch has its entry. That is the one conflict. The
merge keeps both entries without change: the entry of #1087 first, then
the entry of this branch, before the v1.1.0 entries.

Git merged two other files with no conflict:

- crates/storage-mongodb/src/data_engine.rs: #1087 computes the
  parallel Scan segment with scan_segment in scan_key_in_segment and in
  scan_impl. This branch changes the TransactWriteItems functions at
  other lines.
- crates/storage/src/lib.rs: #1087 rewrites the doc comment of
  scan_key_in_segment, and this branch adds the transact exports.
Main is at 1e2ebdd, six commits past 44a7b79: #1485, #1228,
#1325, #1443, #1269 and the squash commit of #1093.

One file conflicted:
crates/storage-mongodb/src/data_engine_live_tests.rs. #1093 declares
the update_window module after delete_table, where this branch
declares the token module. The merge keeps both declarations:
update_window first, then token.

Git merged five other files with no conflict:

- crates/core/src/validation/mod.rs: #1228 adds the pattern clause for
  an empty value in validate_name_member. This branch changes the index
  key checks, at other lines.
- crates/storage/src/error.rs: #1093 adds a sentence to the doc comment
  of IndexesInUse, and this branch adds TransactionInProgress.
- crates/storage/src/lib.rs: #1093 declares update_window_conformance,
  and this branch adds names to the transact exports.
- docs/differences-from-dynamodb.md: #1443 changes the default delay
  to 0.25 s, and #1093 changes the row on stream disable and the row of
  the delay setting. This branch changes the row on index key
  validation.
- docs/manuals/07-upgrade-manual.md: #1093 adds its v1.2.0 entry at the
  top of "Behavior Changes by Release". The entry of this branch stays
  after the v1.2.0 entries of main.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TransactWriteItems ranks index-key faults and the ClientRequestToken differently from the service, and differently per backend

3 participants