Skip to content

fix(engine): check a ClientRequestToken as DynamoDB does - #1375

Merged
hitesh96db merged 4 commits into
mainfrom
fix/959-client-request-token
Nov 26, 2026
Merged

hitesh96db merged 4 commits into
mainfrom
fix/959-client-request-token

Conversation

@LeeroyHannigan

@LeeroyHannigan LeeroyHannigan commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

What

TransactWriteItems now checks a ClientRequestToken as DynamoDB does. The check counts characters, 1 to 36, and has no pattern check. A refusal gets one of the two texts that DynamoDB gives:

  • 1 validation error detected: Value at 'ClientRequestToken' failed to satisfy constraint: Member must have length less than or equal to 36
  • 1 validation error detected: Value at 'ClientRequestToken' failed to satisfy constraint: Member must have length greater than or equal to 1

Before, the check counted bytes and refused a character outside [a-zA-Z0-9-] with a pattern text. It answered an empty token with the maximum length text. Both texts named the member clientRequestToken.

The changes:

  • validate_client_request_token in crates/engine/src/transact_write_helpers.rs checks only the length and writes the two texts above.
  • length_constraint in crates/engine/src/request_limits.rs holds the length rule. The ExecuteTransaction request checks had this rule in Found::length, with the limit MAX_CLIENT_REQUEST_TOKEN (36). Both checks now call length_constraint, so the rule has one copy. The ExecuteTransaction texts do not change.
  • stored_token in transact_write_helpers.rs writes each \ as \\ and each U+0000 as \0. The engine builds the IdempotencyKey from this form, so no backend receives U+0000. The fingerprint still uses the token as sent.
  • assert_token_refused in tests/rust/src/number_validation_order.rs compares the full text. Before, it ignored the case of the member name because of TransactWriteItems: the token length refusal names clientRequestToken, and DynamoDB now writes ClientRequestToken #959.
  • The design doc's section on the token table and the storage manual say that the token of IdempotencyKey is this stored form.

Fixes #959
Fixes #1374

Why

I measured DynamoDB in us-east-1 on 23 November 2026. Each TransactWriteItems request had one Put to a table that does not exist. Each request went out twice and got the same answer both times. A token that passes the check reaches the table lookup and gets ResourceNotFoundException.

Rows Token DynamoDB ExtendDB before
T0 36 a passes passes
T7 36 é (72 bytes) passes the maximum length text
T2, T3 abc_def, abc def passes the pattern text
T9, T10, T11 abc, then U+0001, a tab or U+0000, then def passes the pattern text
T12 U+0000 alone passes the pattern text
BS1, BS2 \ alone, \ before 0 passes the pattern text
T1, T5, T6, T8 37 a, 37 _, 36 a and one _, 37 é the maximum length text the maximum length text
T4 empty the minimum length text the maximum length text

The ExtendDB texts before named clientRequestToken, so the T1, T5, T6 and T8 answers differ in the member name. The pattern text was Member must satisfy regular expression pattern: [a-zA-Z0-9-]+. With this PR, ExtendDB gives the answer of DynamoDB for every row.

I measured ExecuteTransaction on the same day. Eleven of the tokens went out as its ClientRequestToken, with one INSERT into a table that does not exist, each twice. The same tokens pass. A refusal keeps the ExecuteTransaction form, 1 validation error detected: Value '<token>' at 'clientRequestToken' failed to satisfy constraint: .... ExecuteTransaction gives its token to the TransactWriteItems check after its own length check. So before this PR, a token such as abc_def got the pattern text there too.

Each backend stores the token for idempotency. PostgreSQL stores it in a text column, which cannot hold U+0000, so a token with U+0000 would fail the statement. In the stored form, two tokens never get the same string, because the form decodes to one token only. A token of [a-zA-Z0-9-] is the only kind an earlier build accepted, and its stored form is the token. A replay after an upgrade therefore finds the token that an earlier build stored.

The PostgreSQL catalog has its own U+0000 escape, escape_str in crates/storage-postgres/src/catalog_json.rs, for its JSON documents. This PR does not reuse it in the PostgreSQL token query. The escape in the engine keeps U+0000 out of all four backends. With escape_str in the PostgreSQL token query only, SQLite, MongoDB and Cassandra would store a token that holds U+0000. That path did not run on this host. That form would be about 10 lines shorter.

Testing done

  • cargo test -p extenddb-engine --lib --no-fail-fast: 869 passed. cargo test -p extenddb-storage --no-fail-fast: 284 passed.
  • cargo +1.97.0 clippy -p extenddb-engine -p extenddb-storage --all-targets -- -D warnings and cargo +1.97.0 fmt --all -- --check are clean.
  • The table test client_request_tokens has the 15 measured rows with the answers of DynamoDB, and the stored form of each token. A control kept the tests and put back the check of main: 14 of the 15 rows failed.
  • Against a release build on SQLite, the 13 TransactWriteItems rows T0 to T12 got the answers of DynamoDB twice each. The bodies were the same byte for byte, __type included. The 11 ExecuteTransaction rows got the status, type and text of DynamoDB.
  • A replay check on that build sent a token with U+0000, \ and a tab twice. The server answered the second request as a replay, with 2 read capacity units. The same token with another Put got IdempotentParameterMismatchException. The tokens x U+0000 y and x\0y wrote two items.
  • An upgrade check stored a transaction under a token of [a-zA-Z0-9-] with a build of main. A build of this PR then served the same SQLite file. The same request was a replay, and the same token with another Put got IdempotentParameterMismatchException.
  • The Python tests of the transaction and PartiQL modules passed against the SQLite build: 322 passed and 2 xfailed. The two xfails are the strict TRANSACTION_INDEX_UNITS marks, which do not depend on the token.
  • MongoDB and Cassandra did not run on this host. PostgreSQL ran for the changes since the 24 November review, below.
  • The last amend changed the doc comment of the table test only. The runs above used the commit before it.

Over main after the merge, production is +66 -53, the docs +7 -1 and the tests +83 -46.

git merge-tree of b0f1135 with main at a417b2f is clean. With four open PRs, b0f1135 adds a conflict in crates/engine/src/partiql/request_checks.rs. #1262, #1365, #1367 and #1373 delete NOT_NULL next to the AT_LEAST_ONE lines that this PR moves. A resolution deletes both.

Changes since the 24 November review

  • cd954f3 merges main at 3534c9e, with no conflict.
  • 0b180a3 adds the tokens that the stored form changes to tests/test_idempotency_account_scope.py. One test runs over a table of five tokens: a plain token, 28 U+0000, 14 U+1F600 and 14 U+0000, 20 backslashes, and x U+0000 y. Each one runs on a table of its own. Each token applies once, replays with no second write, and refuses a changed request. The plain row replaces the two single-token tests. A second test sends x U+0000 y and x\0y and expects two transactions. The commit also narrows the token comment in transact_write_items and describes the stored form in the design doc and the storage manual.
  • b0f1135 moves length_constraint, MAX_CLIENT_REQUEST_TOKEN and AT_LEAST_ONE to crates/engine/src/request_limits.rs. After the merge, the engine did not compile without its partiql feature, which the WebAssembly adapter leaves off.
  • After the three commits:
    • cargo test -p extenddb-engine --lib passed 888 tests, and cargo test -p extenddb-wasm-adapter passed its 3 unit tests and the parity corpus.
    • cargo check -p extenddb-engine --no-default-features --lib, clippy with -D warnings on the engine, and cargo fmt --check are clean.
    • On a PostgreSQL server built from the branch, the file passed 7 tests. The 2 cross-account tests did not run, because they need a second account.
    • With stored_token replaced by the token as sent, the engine lib tests still passed. On PostgreSQL the four tests that send U+0000 then failed with InternalServerError, and the plain and backslash rows passed.
    • DynamoDB counts the token in characters: 36 U+1F600 passed its check and 37 got the maximum length text (25 November, twice each).

DynamoDB checks the token ahead of the item count, the one-operation check and the enum members. ExtendDB checks it after them, on main and on this branch. #1463 tracks that order.

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


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.

TransactWriteItems counted the token in bytes and refused a character
outside [a-zA-Z0-9-] with a pattern text. It answered an empty token
with the maximum length text, and both texts named clientRequestToken.

DynamoDB was measured in us-east-1 on 23 Nov 2026. Each signed
TransactWriteItems request had one Put to a table that does not exist.
Each request went out twice, with the same answer both times. A token
that passes the check reaches the table lookup and gets
ResourceNotFoundException. These tokens pass:

- 36 a, and 36 é (72 bytes)
- abc_def and abc def
- abc, then U+0001, a tab or U+0000, then def
- U+0000 alone
- a backslash alone, and a backslash before 0

A token of 37 a, 37 _, 36 a and one _, or 37 é gets this answer:

    1 validation error detected: Value at 'ClientRequestToken' failed
    to satisfy constraint: Member must have length less than or equal
    to 36

An empty token gets this answer:

    1 validation error detected: Value at 'ClientRequestToken' failed
    to satisfy constraint: Member must have length greater than or
    equal to 1

The check now counts characters with the length rule of the
ExecuteTransaction request checks and their limit of 36. It writes the
two texts with ClientRequestToken and has no pattern check.
ExecuteTransaction runs this check after its own length check, so it no
longer refuses a token by pattern either.

Each backend stores the token for idempotency, and a PostgreSQL text
column cannot hold U+0000. The engine now doubles each backslash of the
token and writes each U+0000 as \0 before a backend sees it. Two tokens
never share this form. A token of [a-zA-Z0-9-], the only kind an earlier
build accepted, keeps its form, so the tokens such a build stored still
match. The fingerprint still uses the token as sent.

Fixes #959.
Fixes #1374.

@hitesh96db hitesh96db left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required: a test that pins the stored_token call on PostgreSQL (first inline comment). I will approve once it is added.

Optional: docs/design/04-component-storage.md section 9 and docs/manuals/12-extending-extenddb-storage.md line 95 describe how a backend keys (account_id, token). The key is now the escaped form (\ doubled, U+0000 written \0) and both are unchanged. The PR body says no document describes the token check. These two describe the token store.

The branch is 12 commits behind main and lacks #526 and #774, so some replay and message differences show on the PR head alone and are fixed on main. A merge of the PR into main regresses no cell against main in 261 validation cells and 59 replay rows on SQLite, and the rows for U+0000, backslash, spaces and astral characters now match DynamoDB.

let token = input
.client_request_token
.as_deref()
.map(super::transact_write_helpers::stored_token);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing pins this call. With .map(super::transact_write_helpers::stored_token) changed to .map(str::to_owned) on a clean tree, cargo test -p extenddb-engine --lib --no-fail-fast passes 869 of 869. A SQLite server built with the same change answers 200 for 16 of 16 hostile tokens (U+0000, \0, \\, backslash runs) and replays each, because SQLite stores U+0000 in a TEXT key. A SQLite wire test cannot catch it either.

On PostgreSQL the same change answers a ClientRequestToken of 36 U+0000 with 500 InternalServerError, and the server log reads SQLSTATE 22021: invalid byte sequence for encoding "UTF8": 0x00. An 18 U+1F600 plus 18 U+0000 token answers the same. With the call in place both answer 200 and replay 200. No test in tests/rust or tests/*.py sends a token with U+0000 or a backslash.

Add a Python wire test that sends a token holding U+0000, one holding backslashes, and x U+0000 y against x\0y. It replays each, then sends each token with a different Put and expects IdempotentParameterMismatchException. The PR body says PostgreSQL did not run on the author's host, so this path has run on PostgreSQL only in my check.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 0b180a3. tests/test_idempotency_account_scope.py now runs one test over a table of tokens, each on a table of its own: a plain token, 28 U+0000, 14 U+1F600 and 14 U+0000, 20 backslashes, and x U+0000 y, each with a suffix unique to the run. Each token applies once, replays with 200 and no second write, and answers IdempotentParameterMismatchException for a changed request. test_nul_and_backslash_zero_are_two_tokens sends x U+0000 y and x\0y and expects two transactions. On a PostgreSQL server built from the branch, the file passes 7 tests. With .map(super::transact_write_helpers::stored_token) changed to .map(str::to_owned), the 888 engine lib tests still pass, and on PostgreSQL the four tests that send U+0000 fail with InternalServerError. The plain and backslash rows pass there, since a text column holds a backslash as sent. DynamoDB accepts these tokens: it counts the token in characters, so 36 U+1F600 pass its check and 37 get the length text (measured on 25 November, twice each). The design doc's section 9 and the storage manual now describe the stored form, as your review asked.

}

// The client request token's length and pattern are checked ahead of the
// The client request token's length is checked ahead of the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment says the token is checked ahead of the actions. In this function the count check and the exactly-one-operation check run first, and the enum fields are read during deserialization before either. DynamoDB checks the token first and lists it with a count fault in one message. Measured in us-east-1 on 2026-11-24, each request twice with identical answers.

{"TransactItems": [], "ClientRequestToken": ""}

  • DynamoDB: 2 validation errors detected: Value at 'ClientRequestToken' failed to satisfy constraint: Member must have length greater than or equal to 1; Value at 'TransactItems' failed to satisfy constraint: Member must have length greater than or equal to 1
  • This PR and main: 1 validation error detected: Value '[]' at 'transactItems' failed to satisfy constraint: Member must have length greater than or equal to 1

One item holding both Put and Delete, with a token of 37 a:

  • DynamoDB: 1 validation error detected: Value at 'ClientRequestToken' failed to satisfy constraint: Member must have length less than or equal to 36
  • This PR and main: TransactItems[0] must contain exactly one of ConditionCheck, Put, Delete, or Update

A bad ReturnConsumedCapacity with the same token also answers the token text on DynamoDB and the enum text here. main answers the same as the PR, so this is not a regression and not a condition. Narrow the comment to the faults that follow the shape checks.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I measured your three rows again in us-east-1, each twice, on a table that does not exist, and got your answers. The comment in 0b180a3 now says that the token check runs after the item count, the one-operation check and the enum members read during deserialization, and ahead of each item's own checks. It also says that DynamoDB checks the token ahead of all three and lists it with a count fault in one message. main answers these rows as this PR does, so I filed the order as #1463.

Nothing pinned the call to `stored_token` in `transact_write_items`. With
the call replaced by the token as sent, every engine test passed. On
PostgreSQL that change answers 500 to a token that holds U+0000, because a
text column holds no U+0000.

`tests/test_idempotency_account_scope.py` now runs one test over a table of
tokens: a plain one, one of U+0000, one of U+0000 after astral characters,
one of backslashes, and one with a U+0000 inside, on a table of its own
each. Each token applies once, replays with 200 and no second write, and
answers IdempotentParameterMismatchException for a changed request. The
plain row replaces the two single-token tests, whose steps the table test
runs. A second test sends `x` U+0000 `y` and `x` `\` `0` `y` with one
suffix and expects two transactions, because the two tokens must not share
a stored form. The CI jobs run the file on every backend. With
`stored_token` replaced, the tests that send U+0000 fail on PostgreSQL with
InternalServerError. The plain and backslash rows pass, since a text column
holds a backslash as sent.

The design doc's section on the token table and the storage manual now say
that the `token` of `IdempotencyKey` is that stored form. The comment in
`transact_write_items` now says where the token check runs: after the item
count, the one-operation check and the enum members read during
deserialization, and ahead of each item's own checks. DynamoDB checks it
ahead of all three.
#1009 compiles the engine's `partiql` module only with the `partiql`
feature, and the WebAssembly adapter builds the engine without it. The
TransactWriteItems token check read `length_constraint` and
`MAX_CLIENT_REQUEST_TOKEN` from `partiql::request_checks`, so after the
merge of main the engine did not compile without the feature:
`cargo test -p extenddb-wasm-adapter` failed with E0433 at
`transact_write_helpers.rs`.

The two items and the `AT_LEAST_ONE` constraint they use move to
`request_limits.rs`, which every build compiles. The PartiQL request checks
import them from there. The code does not change.

@hitesh96db hitesh96db left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The item I required is fixed, and I have no open request. One optional cleanup remains. Checked at b0f1135c on SQLite, PostgreSQL and DynamoDB in us-east-1.

stored_token is now pinned. tests/test_idempotency_account_scope.py fails on PostgreSQL with the call changed to str::to_owned: 4 failed and 5 passed. The failures are [nul-run], [astral-and-nul], [nul-inside] and test_nul_and_backslash_zero_are_two_tokens, each answering InternalServerError with SQLSTATE 22021 in the server log. On SQLite all 9 pass with the call removed, so only PostgreSQL catches it, and run-integration (3) runs the file on PostgreSQL (9 of 9 pass). Dropping the NUL escape fails the same four tests. Dropping the backslash doubling, or swapping the two replaces, fails test_nul_and_backslash_zero_are_two_tokens on SQLite.

The token table passes on SQLite, PostgreSQL and DynamoDB, with two runs on DynamoDB. Four more tokens (36 U+0000, 36 U+1F600, 36 backslashes, 18 \0) pass on all three.

The new comment on the order of the token check matches the code and DynamoDB on every row I sent, each twice with identical answers. The commit that moved the length check out of the PartiQL module changes no answer: all 44 cells of the 22-token grid across TransactWriteItems and ExecuteTransaction are identical on SQLite, PostgreSQL, the earlier head and DynamoDB. The tightened Rust token assertion fails with the member-name case changed.

Optional: crates/engine/src/partiql/mod.rs line 55 still reads pub(crate) mod request_checks;, and nothing outside partiql uses it any more. Put it back to mod request_checks;.

One case my first review missed, optional: with TransactItems missing and a 37-character token, DynamoDB lists both faults and names the token member in lower case. ExtendDB answers a SerializationException. This belongs with #1463.

CI: 59 of 59 checks pass. The branch merges cleanly onto current main, and none of main's 13 newer commits touches the PR's files. The wider Python run on SQLite gave 361 passed and 2 xfailed.

Not measured: MongoDB and Cassandra, and a rerun of the PostgreSQL concurrent-send race.

@hitesh96db
hitesh96db added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 708821b Nov 26, 2026
59 checks passed
@hitesh96db
hitesh96db deleted the fix/959-client-request-token branch November 26, 2026 02:07
@robinnsc robinnsc mentioned this pull request Nov 26, 2026
6 of 8 tasks
robinnsc added a commit that referenced this pull request Nov 26, 2026
Moves the workspace version from 1.0.0 to 1.1.0 on every surface that
carries it: the root Cargo.toml version and its 13 exact pins, the 15
workspace entries in Cargo.lock (no third-party entry changes),
packaging/npm/package.json (the version and the five platform pins),
the four license-notice files (regenerated with cargo-about 0.9.0), and
the sample `extenddb version` and `serve` output in
docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md.

This is a minor release. Since v1.0.0, main has two features (#468,
#1009) and changes that make ExtendDB answer as DynamoDB does, which
docs/versioning.md ships in a minor release. It adds no catalog
migration (RELEASED_THROUGH stays 12, the last id), no configuration
key and no backup format version.

Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468
(AT_TIMESTAMP, and the GetShardIterator answers it changes), #486,
#503, #544, #567, #765 and #774, #588, #596, #690, #963, #1144, #1173,
#1194 and #1375, next to the existing entries for #398, #526 and
#1166. The #526 entry now gives the old TransactWriteItems mismatch
message, and the entries are in PR order. Current Status, the General
Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no
migrate step, the #1166 checks before a PostgreSQL upgrade, and a
rollback runs the 1.0.0 binary on the same catalog, with the two
limits the manual names (#526 tokens, and 1.0.0's catalog-check
--fix). The rollback note of the KEK-file switch says that 1.0.0
serves a switched catalog.

docs/manuals/11-deployment-guide.md: a sentence about the release
before the one that carries #398 is gone.
robinnsc added a commit that referenced this pull request Nov 27, 2026
Moves the workspace version from 1.0.0 to 1.1.0 on every surface that
carries it: the root Cargo.toml version and its 13 exact pins, the 15
workspace entries in Cargo.lock (no third-party entry changes),
packaging/npm/package.json (the version and the five platform pins),
the four license-notice files (regenerated with cargo-about 0.9.0), and
the sample `extenddb version` and `serve` output in
docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md.

This is a minor release. Since v1.0.0, main has three features (#468,
#1009, #1449) and changes that make ExtendDB answer as DynamoDB does, which
docs/versioning.md ships in a minor release. It adds no catalog
migration (RELEASED_THROUGH stays 12, the last id), no configuration
key and no backup format version.

Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468
(AT_TIMESTAMP, and the GetShardIterator answers it changes), #486,
#503, #544, #567, #765 and #774, #588, #596, #690, #963, #1144, #1173,
#1194, #1375 and #1522, next to the existing entries for #398, #526,
#1166, #1449 and #1523. The #526 entry now gives the old
TransactWriteItems mismatch message, the #1523 heading takes the
v1.1.0: prefix, and the entries are in PR order. Current Status, the General
Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no
migrate step, the #1166 checks before a PostgreSQL upgrade, and a
rollback runs the 1.0.0 binary on the same catalog, with the two
limits the manual names (#526 tokens, and 1.0.0's catalog-check
--fix). The rollback note of the KEK-file switch says that 1.0.0
serves a switched catalog.

docs/manuals/11-deployment-guide.md: a sentence about the release
before the one that carries #398 is gone.
robinnsc added a commit that referenced this pull request Nov 27, 2026
Moves the workspace version from 1.0.0 to 1.1.0 on every surface that
carries it: the root Cargo.toml version and its 13 exact pins, the 15
workspace entries in Cargo.lock (no third-party entry changes),
packaging/npm/package.json (the version and the five platform pins),
the four license-notice files (regenerated with cargo-about 0.9.0), and
the sample `extenddb version` and `serve` output in
docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md.

This is a minor release. Since v1.0.0, main has three features (#468,
#1009, #1449) and changes that make ExtendDB answer as DynamoDB does, which
docs/versioning.md ships in a minor release. It adds no catalog
migration (RELEASED_THROUGH stays 12, the last id), no configuration
key and no backup format version.

Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468
(AT_TIMESTAMP, and the GetShardIterator answers it changes), #486,
#503, #544, #567, #765 and #774, #588, #596, #690, #963, #1144, #1173,
#1194, #1375 and #1522, next to the existing entries for #398, #526,
#1166, #1449 and #1523. The #526 entry now gives the old
TransactWriteItems mismatch message, the #1523 heading takes the
v1.1.0: prefix, and the entries are in PR order. Current Status, the General
Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no
migrate step, the #1166 checks before a PostgreSQL upgrade, and a
rollback runs the 1.0.0 binary on the same catalog, with the two
limits the manual names (#526 tokens, and 1.0.0's catalog-check
--fix). The rollback note of the KEK-file switch says that 1.0.0
serves a switched catalog.

docs/manuals/11-deployment-guide.md: a sentence about the release
before the one that carries #398 is gone.

docs/troubleshooting.md: the bus error entry names 1.0.0 as the release
that has the bug, so its line carries a version-literal-ok marker.
LeeroyHannigan added a commit that referenced this pull request Nov 27, 2026
* chore(release): bump version to 1.1.0

Moves the workspace version from 1.0.0 to 1.1.0 on every surface that
carries it: the root Cargo.toml version and its 13 exact pins, the 15
workspace entries in Cargo.lock (no third-party entry changes),
packaging/npm/package.json (the version and the five platform pins),
the four license-notice files (regenerated with cargo-about 0.9.0), and
the sample `extenddb version` and `serve` output in
docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md.

This is a minor release. Since v1.0.0, main has three features (#468,
#1009, #1449) and changes that make ExtendDB answer as DynamoDB does, which
docs/versioning.md ships in a minor release. It adds no catalog
migration (RELEASED_THROUGH stays 12, the last id), no configuration
key and no backup format version.

Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468
(AT_TIMESTAMP, and the GetShardIterator answers it changes), #486,
#503, #544, #567, #765 and #774, #588, #596, #690, #963, #1144, #1173,
#1194, #1375 and #1522, next to the existing entries for #398, #526,
#1166, #1449 and #1523. The #526 entry now gives the old
TransactWriteItems mismatch message, the #1523 heading takes the
v1.1.0: prefix, and the entries are in PR order. Current Status, the General
Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no
migrate step, the #1166 checks before a PostgreSQL upgrade, and a
rollback runs the 1.0.0 binary on the same catalog, with the two
limits the manual names (#526 tokens, and 1.0.0's catalog-check
--fix). The rollback note of the KEK-file switch says that 1.0.0
serves a switched catalog.

docs/manuals/11-deployment-guide.md: a sentence about the release
before the one that carries #398 is gone.

docs/troubleshooting.md: the bus error entry names 1.0.0 as the release
that has the bug, so its line carries a version-literal-ok marker.

* docs(upgrade): add the v1.1.0 entry of #1290, put #1349's in order

#1290 merged after this branch was rebased. It changes the answer to a
request with no Authorization header, so it gets a v1.1.0 entry. The
merge of main put the #1349 entry after the #1523 entry. It moves to
the place of its number, beside the new #1290 entry.

---------

Co-authored-by: Lee Hannigan <29015211+LeeroyHannigan@users.noreply.github.com>
annguy3n added a commit to annguy3n/extenddb that referenced this pull request Nov 30, 2026
Resolve the Cargo.toml and Cargo.lock merge conflicts with main (v1.1.0) and
adapt the Cloud Bigtable storage backend to upstream changes:

- Align workspace Cargo.toml and Cargo.lock with ExtendDB v1.1.0 (ExtendDB#1514), MSRV
  1.94.0 and sqlx 0.9.1 (ExtendDB#1166), and extenddb-server default-features = false
  (ExtendDB#1449), bumping extenddb-storage-bigtable to =1.1.0.
- Adapt AuthorizationStore::fetch_session_data (ExtendDB#1523) to look up role session
  policy, tags, and RFC 3339 created_at in O(1) by access_key_id via
  iam_session_ak:<access_key_id> -> iam_session:<session_token> without
  re-checking session expiry, with symmetric 4 KiB row-key and non-empty token
  guards across fetch_session_data and lookup_credential.
- Decide StreamSpecification transitions in BigtableEngine::update_table ahead
  of companion table fields and GSI updates (ExtendDB#963) so a refused disable/enable
  writes no other table member while still closing any open shards left behind
  by a prior disable.
- Update docs/bigtable-setup.md for Rust 1.94.0 and the exact v1.1.0 extenddb
  version output.
- Add unit and live cbtemulator integration tests covering
  session_data_conformance::run, expired/deleted/oversized session-data and
  credential lookups, write_bootstrap_rows admin environment-variable
  combinations and idempotent re-runs (ExtendDB#1349), ClientRequestToken NUL/backslash/
  UTF-8 escaped stored tokens (ExtendDB#1375), and refused stream disable/enable
  preceding companion edits (ExtendDB#963).
annguy3n added a commit to annguy3n/extenddb that referenced this pull request Nov 30, 2026
Merge upstream main (ExtendDB v1.1.0) into rfc/bigtable-backend and
reverse-sync docs/rfcs/0000-bigtable-backend.md with the v1.1.0 trait
surface and conformance coverage:

- Update ExtendDB binary version literals to v1.1.0 (ExtendDB#1514).
- Document O(1) access-key-indexed AuthorizationStore::fetch_session_data
  (including expired sessions), symmetric 4 KiB key-length bounds, and
  session_data_conformance::run (ExtendDB#1523).
- Document escaped ClientRequestToken stored tokens (ExtendDB#1375), pre-companion
  StreamSpecification refusal in TableEngine::update_table (ExtendDB#963), default
  SettingsStore::get_setting_bounded (ExtendDB#1449), and write_bootstrap_rows admin
  environment-variable handling (ExtendDB#1349).
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
#1375 moved AT_LEAST_ONE, MAX_CLIENT_REQUEST_TOKEN and length_constraint
from partiql/request_checks.rs to request_limits.rs. This branch moved
MAX_PARTS there too. The merge imports those three and validation_refusal
from request_limits.rs, and request_checks.rs keeps neither AT_LEAST_ONE
nor MAX_PARTS.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
NOT_NULL moves from partiql/request_checks.rs to request_limits.rs,
beside AT_LEAST_ONE, as #1375 moved that constant. check_batch_get
writes its null clause with it. The PartiQL module builds only with the
partiql feature, and check_batch_get runs in every build, so the clause
cannot come from Found::null.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants