Skip to content

fix(engine): refuse the TableClass and SSESpecification DynamoDB refuses - #1114

Open
LeeroyHannigan wants to merge 13 commits into
fix/1051-projection-stream-enumsfrom
fix/1052-sse-table-class
Open

LeeroyHannigan wants to merge 13 commits into
fix/1051-projection-stream-enumsfrom
fix/1052-sse-table-class

Conversation

@LeeroyHannigan

@LeeroyHannigan LeeroyHannigan commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Changes since the last review

  • 0838a5e adds test_sse_enabled_string_creates_the_table to tests/test_table_enum_members.py. It creates a table from {"Enabled": "TRUE", "SSEType": "KMS"} and checks SSEDescription ENABLED with SSEType KMS. It creates another from {"Enabled": "no"} and checks that it has no SSEDescription. Each row checks the CreateTable answer and DescribeTable, so the wire jobs check the boolean that each backend records. The test does not run against DynamoDB, because no CreateTable with these bodies went to it.
  • 7b0f3db rewords the paragraph about Enabled strings in the upgrade manual entry. It names the strings that DynamoDB's UpdateTable read on 2 December 2026, and "yes", "y" and "n", which it read on 3 December 2026. The other ASCII cases come from other boolean members that DynamoDB reads the same way.
  • 79c4346 merges fix(engine): refuse ProjectionType and StreamViewType outside their sets #1110's head 2792dee, which brings main at c057660. The upgrade manual conflicted where this branch had its entry. The entry of this branch now follows the entry of fix(engine): refuse ProjectionType and StreamViewType outside their sets #1110, after main's v1.2.0 entries.
  • The gates on 7b0f3db are in Testing done. This round changes no Rust file.

What

CreateTable now refuses the SSESpecification values that DynamoDB refuses. CreateTable and UpdateTable now refuse a TableClass outside its set. Each refusal is a ValidationException with DynamoDB's text:

  • An SSEType outside [AES256, KMS] and a KMSMasterKeyId of more than 2048 characters go into one N validation errors detected message with the other member faults. ExtendDB counts the key in characters.
  • {"Enabled": true, "SSEType": "AES256"} gets One or more parameter values were invalid: SSEType AES256 is not supported.
  • An SSEType with Enabled false gets One or more parameter values were invalid: SSEType can not be specified if Enabled is false. A KMSMasterKeyId with Enabled false gets the same sentence with KMSMasterKeyId in place of SSEType.
  • A KMSMasterKeyId with Enabled true and no SSEType KMS gets One or more parameter values were invalid: SSEType KMS is required if KMSMasterKeyId is specified.
  • A TableClass outside [STANDARD, STANDARD_INFREQUENT_ACCESS] gets Invalid table-class parameter provided. Please try again with a valid table-class value: [STANDARD, STANDARD_INFREQUENT_ACCESS].

DynamoDB's UpdateTable reads an Enabled written as a string as a boolean. On 2 December 2026 it read "TRUE", "true", "t" and "1" as true, and "FALSE", "False", "false", "no", "f", "0" and "N" as false. It refused "", "on" and "maybe" while it read the body, with SerializationException Unexpected token received from parser. On 3 December 2026 it read "yes" and "y" as true and "n" as false. In other boolean members, DynamoDB reads the same ten strings in any ASCII case: "true", "t", "yes", "y" and "1" as true, and "false", "f", "no", "n" and "0" as false. read_sse_enabled in crates/engine/src/create_table.rs reads the string so after the read, and writes the boolean back into the specification. So check_sse_specification, the backends and DescribeTable read the same value. boolean_text in crates/engine/src/query_key_values.rs reads the strings from BOOLEAN_TEXTS, the list of #984. CreateTable was not measured with an Enabled string. UpdateTable reads the specification from #1126 on, and #1126 adds the measured UpdateTable rows. The One or more parameter values were invalid sentences apply when Enabled is a boolean or such a string. An Enabled of another JSON type is not checked on CreateTable (#1547).

The checks run in DynamoDB's order, except for the requests listed at the end. A member of the wrong JSON type answers first, and so does an Enabled string that DynamoDB does not read as a boolean. The table name checks come next, on CreateTable and on UpdateTable. The table class fault then answers ahead of the member faults that EnumFaults records, and on UpdateTable ahead of the table lookup. Two faults still answer ahead of the table class fault, where DynamoDB answers the table class fault first. The first is a null or missing StreamEnabled, which ExtendDB checks before it reads the request. The second is a KeyType outside its set, which the typed read refuses. ExtendDB checks BillingMode and TableThroughputMode before it reads the request, so the table class fault answers in place of those faults.

On CreateTable, the member faults list the GSIs, then the key length, then SSEType, then StreamViewType, then the LSIs. The SSESpecification sentences come after the member faults and the other checks of the request, and ahead of the ResourceInUseException for a table that exists.

table_class_fault and EnumFaults::sse_specification are in crates/engine/src/nested_enums.rs. check_sse_specification is in crates/engine/src/create_table.rs.

The KMSMasterKeyId with Enabled false sentence is not in the issue's table. DynamoDB refuses that request with it (measured 18 November 2026), and the head of #1110 creates the table. It is one line in the check that writes the issue's SSEType can not be specified if Enabled is false.

This PR targets the branch of #1110, fix/1051-projection-stream-enums, because it adds the SSE members to the EnumFaults record that #1110 adds. Merge #1110 first.

The message of ff39b49 says that DynamoDB reads the string "false" as false and any other string as true. 45cc084 replaces that reading with the one measured on 2 December 2026. The message of 773a50a says "ExtendDB now checks in this order, except for UpdateTable's name length (#1109)". A null or missing StreamEnabled and a KeyType fault also answer ahead of the table class fault, as this section says. Whoever merges: please use the What section of this body as the squash message.

Why

These are DynamoDB's answers, measured in us-east-1. DynamoDB answered the rows of the issue on 13 and 14 November 2026. On 18 November 2026, 42 more requests that DynamoDB refuses went out twice each, to DynamoDB and to ExtendDB on SQLite. Each request got the same answer both times. 773a50a gives DynamoDB's error type and text to 28 of them, and the head of #1110 to 3. Each of those 3 keeps its answer. Both builds accept 4 more requests that DynamoDB accepts. None of the 42 requests sends Enabled as a string or carries ReplicaUpdates. 960293f changes the answers of two of them, which the list below names. The 42 requests were not sent again to this head.

Closes #1052

Testing done

  • At 7b0f3db, cargo +1.97.0 test --lib passed 983 engine tests and 1260 core tests, with 1 ignored. The server lib tests gave 521 passed and 5 failed. The 5 are the backup_store::tests that refuse a spool or a backup root under /local/home, which belongs to another user on the build host (storage-sqlite: the two write_lock_tests fail when an ancestor of the Cargo target directory is owned by another user #1414). cargo +1.97.0 test -p extenddb-wasm-adapter passed its 3 unit tests and the parity corpus test, and cargo +1.97.0 test -p extenddb-storage-postgres --test doc_version_literals passed 3 tests.
  • cargo +1.97.0 fmt --all -- --check is clean. The two clippy commands of CI on the workspace with -D warnings are clean: one with --features extenddb-storage-cassandra/test-hooks,extenddb-storage-mongodb/test-hooks, and one with --features extenddb-engine/backup-test-hooks. So are cargo +1.94.0 check --all-targets on the engine and the clippy step of the WebAssembly workflow.
  • tests/test_table_enum_members.py sends the issue's rows, rows for the measured order and the UpdateTable name rows, and creates the two tables from an Enabled string. Against ExtendDB on SQLite and on PostgreSQL, built from 7b0f3db, this file passed 62 tests. The two Python suites collect with no error: 7366 tests in tests/ and 820 in tests/python.
  • With the production files reverted to the head of fix(engine): refuse ProjectionType and StreamViewType outside their sets #1110, the Rust row test fails. With the Enabled reading of ff39b49, the row test fails on the "FALSE" row, and the new test fails on the table created with "TRUE": DescribeTable has no SSEDescription. Without the name check on UpdateTable, the row test fails on the name of 256 characters.
  • With read_sse_enabled changed to write back the opposite boolean, both rows of test_sse_enabled_string_creates_the_table fail. "TRUE" gets SSEType can not be specified if Enabled is false, and the "no" table reports ENABLED.

Line counts: production +131 -9, tests +381 -40. The round of 2 December: production +37 -11, tests +148 -47. The round of 3 December: tests +28 -1, and one paragraph of the upgrade manual. The upgrade manual entry has 14 lines. The test counts include the SQLite catalog context, which moves from search_vectors_order_tests.rs to test_context.rs.

Not in this PR, each in an open issue:

Other open PRs:

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

Breaking changes

CreateTable refuses the SSESpecification requests above that the previous release accepted, and creates no table for them. A client that sends one gets ValidationException where it got a new table. CreateTable and UpdateTable refuse a TableClass outside [STANDARD, STANDARD_INFREQUENT_ACCESS]. The previous release created or updated the table with that value, or answered another fault. A table that the previous release created with such a value keeps it after the upgrade. CreateTable now reads an Enabled string as DynamoDB reads it. With {"Enabled": "true", "SSEType": "KMS"} it creates a table with encryption, where the previous release created one without, and a string such as "on" gets SerializationException. The v1.2.0 entry of docs/manuals/07-upgrade-manual.md gives these changes.


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.

CreateTable created a table for an SSEType of AES256 or outside its
set, and for an SSEType with Enabled false. It also created one for a
KMSMasterKeyId without an SSEType. It did not check the limit of 2048
characters on KMSMasterKeyId, or a TableClass outside its set.
UpdateTable answered a TableClass outside its set with the table lookup
or the BillingMode fault. DynamoDB refuses each of these requests with
ValidationException. The answers were measured in us-east-1 on 13, 14
and 18 Nov 2026.

DynamoDB reads the body and checks the table name length first. Then
it answers the table class fault ahead of every member fault, and on
UpdateTable ahead of the table lookup. ExtendDB now checks in this
order, except for UpdateTable's name length (#1109). The
BillingMode check still runs before the read, so the table class fault
takes its place there.

CreateTable now lists an SSEType outside its set and a KMSMasterKeyId
of more than 2048 characters with the other member faults. It counts
the key in characters. The order is the GSIs, then the key, then the
SSEType, then the stream view type, then the LSIs. After the other
checks it refuses an SSEType of AES256, and an SSEType or a key with an
Enabled of false. It also refuses a key without the SSEType KMS.

A BillingMode outside its set is still answered alone before the read
(#1109). So a request with that fault and a key that is too long gets
the BillingMode fault alone, where DynamoDB lists both.

Fixes #1052.
DynamoDB reads an Enabled of "false" as false and any other string as
true (measured on UpdateTable, 25 Nov 2026, us-east-1). With "Enabled":
"true" or "yes" and SSEType AES256, it answers "SSEType AES256 is not
supported". With "Enabled": "false" and SSEType KMS, it answers
"SSEType can not be specified if Enabled is false".

check_sse_specification read only a JSON boolean, so it passed these
requests. Now it reads a string in the same way. CreateTable runs the
check, but CreateTable was not measured with these shapes. UpdateTable
runs it from #1126 on, and #1126 adds the measured rows.

@navareamol navareamol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Enabled as a string (create_table.rs, sse_enabled). The check reads any string other than "false" as true, but the stored table is described by SseDescription::from_specification and the backend create_table code, which read Enabled with as_bool(), so a string there is false. On SQLite at ff39b49, CreateTable with {"Enabled": "true", "SSEType": "KMS"} returns 200 and DescribeTable has no SSEDescription, while {"Enabled": "TRUE", "SSEType": "AES256"} is refused as enabled. So one request is treated as encrypted by the check and as unencrypted by DescribeTable. Has anyone checked whether DynamoDB creates a KMS-encrypted table for "Enabled": "true"? If it does, I think the simplest fix is to turn Enabled into a boolean once, before the typed read, so the check and the backends see the same value. Also, no row in nested_enums_tests.rs or test_table_enum_members.py sends Enabled as a string, so deleting the Value::String arm of sse_enabled leaves every test passing. Could you add rows for "false" and for another string?

Table class over a wrong JSON type. .map_err(|e| table_class.clone().unwrap_or(e))? returns before the typed read. CreateTable with BillingMode: "BOGUS", TableClass: "BOGUS" and Tags: "x" gets the table class sentence, while your row ct-table-class-tags (the same without BillingMode) gets SerializationException. UpdateTable with AttributeDefinitions: "x" behaves the same way. Do you know what DynamoDB answers when all three are present? If it is the SerializationException, the table class branch could let the typed read run before it answers.

UpdateTable name checks. CreateTable calls validate_table_name before it returns the table class fault, but UpdateTable returns it before the TableName must not be empty check. UpdateTable with TableName: "" and TableClass: "BOGUS" used to get TableName must not be empty and now gets the table class sentence; a 256-character name gets the table class sentence where the description says DynamoDB answers the name length fault. I think calling the same validate_table_name on UpdateTable before return Err(fault) would answer the length fault. Is there a reason to leave it out?

SSESpecification with no Enabled. check_sse_specification returns Ok when Enabled is missing, so {"SSEType": "KMS"}, {"SSEType": "AES256"} and {"KMSMasterKeyId": "alias/no-such-key"} each create a table with no SSEDescription. Was any of the measured requests sent without Enabled? If DynamoDB refuses these, they need a row and a branch here.

This branch is stacked on #1110 (branch fix/1051-projection-stream-enums), which has a merge conflict with main in crates/engine/src/partiql/test_context.rs. The checks on this PR ran against that branch, so they say nothing about main. Could you update the stack on main?

I will approve once the Enabled string is read the same way by the check and by DescribeTable (or DynamoDB is shown not to encrypt that table) and has test rows, and the UpdateTable name check is either added or explained.

…B does

DynamoDB reads an Enabled written as a string as a boolean while it reads
the body. It reads "true", "t", "yes", "y" and "1" as true, and "false",
"f", "no", "n" and "0" as false, in any ASCII case. It refuses any other
string with SerializationException "Unexpected token received from
parser". It answered so to UpdateTable on 2 Dec 2026, each body twice.

The CreateTable checks read any string other than "false" as true, and
DescribeTable and the backends read a string as false. So the checks read
{"Enabled": "true", "SSEType": "KMS"} as encryption on, and the backends
stored the table without encryption.

CreateTable now writes the boolean back into the specification after the
read, so the checks and the backends read the same value. The new
boolean_text reads the strings from BOOLEAN_TEXTS in query_key_values.rs.

The rows send the strings measured on UpdateTable to CreateTable. A new
test creates tables with "TRUE" and "no" on SQLite and reads DescribeTable.
The SQLite catalog context of the SearchVectors tests moves to
test_context.rs so that both tests use it.
…fault

DynamoDB checks the table name of an UpdateTable before it answers a
TableClass outside its set, as it does on CreateTable. On 2 Dec 2026 it
answered three names beside TableClass "BOGUS" with the name's own fault.
The names had 256 characters, 2 characters and a space.
UpdateTable now calls validate_table_name there, as CreateTable does.

An empty name gets the text CreateTable gives it, where DynamoDB lists the
length clause and the pattern clause (#1486).
The test dropped the CreateTable answer, and the compiler warned about the
unused result. It now checks the SSEDescription of the CreateTable answer
and of DescribeTable. cargo fmt also wraps the UpdateTable name row.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
…ynamoDB does

UpdateTable counted a null Enabled as present, so the rule that reads a
specification naming SSEType or KMSMasterKeyId as Enabled true did not
apply. It also took an Enabled of another JSON type and stored it, and the
backends then read it as false. On a KMS table, {"Enabled": null, "SSEType":
"KMS"} and {"Enabled": 1} each turned encryption off.

DynamoDB answered these on 2 Dec 2026, each body twice, on a table that
does not exist:

- {"Enabled": null, "SSEType": "AES256"} gets "SSEType AES256 is not
  supported", so a null Enabled counts as absent.
- An Enabled of 1 or 0 gets SerializationException "NUMBER_VALUE cannot be
  converted to Boolean".
- An Enabled of [true] gets SerializationException with no message, and
  one of {} gets "Start of structure or map found where not expected".

UpdateTable now counts a null Enabled as absent before that rule, and
check_sse_member_types refuses an Enabled of another type with these
texts through check_member_types. It reads an Enabled string with
read_sse_enabled before that check.

The rows hold each measured body, and the strings that #1114 reads now
also go to UpdateTable. A new test checks the SerializationException texts.
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

@navareamol

Enabled as a string: fixed in 45cc084 and 47c0e03. On 2 Dec 2026, DynamoDB answered UpdateTable on a table that does not exist, each body twice:

  • "TRUE", "true", "t" and "1" with SSEType AES256 get SSEType AES256 is not supported, so they read as true.
  • "FALSE", "False", "false", "no", "f", "0" and "N" with SSEType KMS get SSEType can not be specified if Enabled is false, so they read as false.
  • "", "on" and "maybe" get SerializationException Unexpected token received from parser.

These are the strings of BOOLEAN_TEXTS in query_key_values.rs (#984). read_sse_enabled in create_table.rs now writes that boolean back into the specification after the read. So the check, the backends and DescribeTable read the same value, and another string gets the service's SerializationException. Whether DynamoDB creates a KMS table for "Enabled": "true" needs a CreateTable that it accepts, and this round sent no CreateTable. The refusals above show that the service reads the string as a boolean before its checks. The 14 strings are CreateTable rows in nested_enums_tests.rs, which assume that CreateTable reads them as UpdateTable does. From #1126 on they are also UpdateTable rows, in both test files. A new test creates tables with {"Enabled": "TRUE", "SSEType": "KMS"} and {"Enabled": "no"} on SQLite, and checks the SSEDescription of the CreateTable answer and of DescribeTable. With the old reading, the row test fails on the "FALSE" row and the new test fails on the "TRUE" table.

Table class over a wrong JSON type: DynamoDB answers SerializationException Unexpected field type. UpdateTable with BillingMode BOGUS, TableClass BOGUS and AttributeDefinitions "x" got it on 2 Dec 2026, twice. CreateTable with TableClass BOGUS, BillingMode BOGUS and Tags "x" got it on 18 Nov 2026, twice. The typed read cannot run first here, because it refuses BillingMode BOGUS itself. The row ut-table-class-billing (ALSO_BOGUS with TableClass BOGUS, no wrong type) needs the table class sentence, which DynamoDB answers. For both bodies, the fix is to record the BillingMode fault as EnumFaults records ProjectionType, and to read the body before any answer. That is the order fix of #1109, which lists these requests. Main answers them with the billingMode fault, this PR with the table class sentence. Neither answer is DynamoDB's, and this PR keeps the BillingMode check where main has it.

UpdateTable name checks: fixed in 960293f. UpdateTable now calls validate_table_name before it returns the table class fault, as CreateTable does. On 2 Dec 2026, beside TableClass BOGUS, DynamoDB answered each of these with the name fault, twice: a name of 256 characters, "ab", and "tr04 bad!". The three rows are in both test files. An empty name now gets the text that CreateTable gives it, Value '' at 'tableName' failed to satisfy constraint: Member must have length greater than or equal to 1. DynamoDB lists the length clause for 3 and the pattern clause, and main's UpdateTable answers TableName must not be empty. #1486 tracks the empty name on UpdateTable.

SSESpecification with no Enabled: on UpdateTable, yes. On 18 Nov 2026 DynamoDB read {"SSEType": "AES256"}, {"SSEType": "KMS"} and {"KMSMasterKeyId": "alias/no-such-key"} as specifications with Enabled true. On 2 Dec 2026 it read a null Enabled beside SSEType the same way. #1126 applies that reading and has the rows. On CreateTable, the requests of 18 Nov 2026 hold only {"SSEType": "KMS"}: DynamoDB creates a table with KMS encryption, where ExtendDB creates one without. #1122 tracks the CreateTable reading of a specification without Enabled, and this PR does not change it.

The stack on main: the branches merge instead of rebasing. #1110 merges main in 0a3e466. This PR merges the new head of #1110 in bc443f5 and 1199929, and #1126 merges this PR in 98f7818 and 8bffb25. git merge-tree of each head with main at c444cfc reports no conflict.

The base merges main at c8e66fb, which brings #481, #1137, #1403,
#1465, #1515 and #1411, and adds the v1.2.0 entry of #1110 to
docs/manuals/07-upgrade-manual.md. The merge has no conflict, and no
file has changes on both sides.
Add a v1.2.0 entry at the top of "Behavior Changes by Release" in
docs/manuals/07-upgrade-manual.md, above the entry of #1110. It gives
the SSESpecification values that CreateTable now refuses and the
TableClass refusal of CreateTable and UpdateTable, with the texts of
DynamoDB. It also gives the read of an Enabled string.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base merges main at c8e66fb, which brings #481, #1137, #1403,
#1465, #1515 and #1411, and adds the v1.2.0 entries of #1110 and #1114
to docs/manuals/07-upgrade-manual.md. The merge has no conflict.

Git merged two files at other lines. In crates/core/src/types/table.rs,
main changes the members of a DELETING table in TableDescription, and
this branch changes the doc comment of the SSESpecification member of
UpdateTableInput. In crates/storage-mongodb/src/table_engine.rs, main
makes the creation time of a table description optional, and this
branch records the specification in update_table.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
Add a v1.2.0 entry at the top of "Behavior Changes by Release" in
docs/manuals/07-upgrade-manual.md, above the entry of #1114. It gives
the 1.1.0 answers to an SSESpecification in UpdateTable, the record of
an accepted specification, and the refusals with the texts of DynamoDB.
It also says what DescribeTable reports after a rollback.
The base now holds main at c057660. #1446 added its v1.2.0 entry at
the top of Behavior Changes by Release, and the base moved its own entry
after main's v1.2.0 entries. The upgrade manual conflicted where this
branch had its entry. The merge takes the manual of the base and puts the
entry of this branch after the entry of the base.
@navareamol

Copy link
Copy Markdown
Collaborator

CreateTable still creates a table without encryption when Enabled is null, a number, a list or an object. On SQLite at 7feeec2, {"Enabled": null, "SSEType": "KMS"}, {"Enabled": 1, "SSEType": "KMS"}, {"Enabled": [true], "SSEType": "KMS"} and {"Enabled": {}, "SSEType": "KMS"} each return 200, and both the CreateTable answer and DescribeTable have no SSEDescription. The comment on check_sse_specification says an Enabled that is not a boolean is not checked. Your UpdateTable measurements say DynamoDB refuses a number, list or object Enabled and reads a null as absent, so the null request would create a KMS table there. #1122 as I read it covers a missing Enabled only. I think CreateTable can run the check that #1126 adds for UpdateTable (check_sse_member_types), or these shapes need their own issue. Which one do you prefer?

The string rows for CreateTable are in nested_enums_tests.rs only, which runs on SQLite. tests/test_table_enum_members.py has no CreateTable row with a string Enabled, so the PostgreSQL, MongoDB and Cassandra jobs never create a table from "TRUE". One row for "TRUE" with SSEType KMS (table created, SSEDescription ENABLED) and one for "no" (table created, none) would cover the backends that read the written back boolean.

The upgrade manual says "yes", "y" and "n" were measured on 2026-12-02. Your list for that date has TRUE, true, t and 1 as true, FALSE, False, false, no, f, 0 and N as false, and "", "on" and "maybe" refused. I think the date applies to those strings and the others come from BOOLEAN_TEXTS. Could you word the entry so it says which strings were measured on UpdateTable?

The rest is resolved at 7feeec2. The string Enabled is written back as a boolean once, so the check, DescribeTable and the backends agree: "true", "TRUE", "yes" and "1" with KMS create an encrypted table, "no" and "0" with KMS are refused, and "", "on" and "maybe" give the SerializationException. With the call removed, refused_enum_members and sse_enabled_string_is_stored_as_read both fail. UpdateTable now checks the name before the table class: an empty name, "ab", a name of 256 characters and "tr04 bad!" each give the name fault. The ut-table-class-name-chars row passes without the new call, because the pattern fault is answered before this branch, so only the two length rows detect it. The stack is clean against main.

Your point on the table class over a wrong JSON type is right: the typed read cannot run first while it refuses BillingMode BOGUS itself, so this needs the #1109 change. #1109 lists BillingMode BOGUS beside a wrong type, but I did not find a TableClass row, so the three member bodies you name are not listed there. Could you add them? A missing Enabled on CreateTable stays with #1122.

I will approve once CreateTable refuses or reads a non boolean Enabled as UpdateTable does, or that is tracked in an issue, and the string rows run on the wire file.

…backend

The CreateTable rows with an Enabled string ran only in
nested_enums_tests.rs, on SQLite. tests/test_table_enum_members.py now
creates a table from {"Enabled": "TRUE", "SSEType": "KMS"} and one from
{"Enabled": "no"}. It checks the SSEDescription of the CreateTable answer
and of DescribeTable, on the backend of each wire job.

The test does not run against DynamoDB, because no CreateTable with these
bodies went to it.
The entry said that DynamoDB read each Enabled string of its list on
2026-12-02. The requests of that day held "TRUE", "true", "t", "1",
"FALSE", "False", "false", "no", "f", "0" and "N", and the refused "",
"on" and "maybe". The entry now gives those strings with their date, and
"yes", "y" and "n" with 2026-12-03. The other ASCII cases come from other
boolean members that DynamoDB reads the same way.
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

@navareamol

CreateTable with an Enabled that is not a boolean or a string: I prefer the issue. #1547 tracks the number, the list and the object, and a comment on #1547 adds the null. This gap was there before this PR. The base of this PR also creates these tables without encryption, because each backend reads the stored Enabled with as_bool.

DynamoDB's CreateTable answers to these bodies are not measured: a body that DynamoDB accepts creates a table, and we send no CreateTable to it. On UpdateTable, DynamoDB reads a null Enabled as absent (measured 2 December 2026). If its CreateTable reads the null the same way, {"Enabled": null, "SSEType": "KMS"} is the body of #1122, so the fix of #1547 needs the reading of #1122 too. The comment says that.

String rows on the wire file: added in 0838a5e. test_sse_enabled_string_creates_the_table in tests/test_table_enum_members.py creates a table from {"Enabled": "TRUE", "SSEType": "KMS"} and checks SSEDescription ENABLED with SSEType KMS. It creates another from {"Enabled": "no"} and checks that it has no SSEDescription. Each row checks the CreateTable answer and DescribeTable. The test does not run against DynamoDB, because no CreateTable with these bodies went to it. On SQLite and PostgreSQL servers built from the new head, the file passed 62 tests. With read_sse_enabled changed to write back the opposite boolean, both rows fail: "TRUE" gets SSEType can not be specified if Enabled is false, and the "no" table reports ENABLED.

The manual entry: reworded in 7b0f3db. It now lists the strings that DynamoDB's UpdateTable read on 2 December 2026. "TRUE", "true", "t" and "1" read as true, "FALSE", "False", "false", "no", "f", "0" and "N" as false, and "", "on" and "maybe" got SerializationException.

Today I sent "yes", "y" and "n" beside SSEType KMS to UpdateTable, on a table that does not exist, each twice. "yes" and "y" got ResourceNotFoundException, so they read as true. "n" got SSEType can not be specified if Enabled is false. The entry gives these three with 3 December. It says that the other ASCII cases come from other boolean members that DynamoDB reads the same way, such as ConsistentRead.

The same run checked the 2 December reading of the true strings. "TRUE", "true", "t" and "1" beside KMS each got ResourceNotFoundException. false and "FALSE" beside AES256 got the false sentence, so the 2 December rows with AES256 read their strings as true.

The TableClass rows for #1109: a comment on #1109 adds the two bodies. One is UpdateTable with BillingMode BOGUS, TableClass BOGUS and AttributeDefinitions "x" (2 December 2026). The other is CreateTable with TableClass BOGUS, BillingMode BOGUS and Tags "x" (18 November 2026). DynamoDB answered both with SerializationException Unexpected field type, and the head of this PR answers both with the table class sentence.

@navareamol navareamol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

CreateTable with an Enabled that is a number, a list, an object or a null still creates a table without encryption at 7b0f3db, as before this PR. I agree with the issue: #1547 lists the number, the list and the object with your UpdateTable measurements, and your comment there adds the null. I also read that a null Enabled with SSEType KMS is the body of #1122 if CreateTable reads a null as absent, so the fix of #1547 needs the reading of #1122 too. CreateTable with these bodies is not measured on DynamoDB, and the issue and the comment say so. The code I looked at is unchanged since 7feeec2 (no file in crates/core or crates/engine differs), so it is not a condition for this PR.

The string rows are on the wire file. test_sse_enabled_string_creates_the_table creates a table from {"Enabled": "TRUE", "SSEType": "KMS"} and checks ENABLED and KMS in the CreateTable answer and in DescribeTable, and creates one from {"Enabled": "no"} and checks that it has no SSEDescription. It is skipped against the real service. On SQLite built from the head of #1126, which contains 7b0f3db, test_table_enum_members.py and test_config_fields.py passed 123 tests. With read_sse_enabled changed to write back the opposite boolean, both rows fail. I did not run PostgreSQL, Cassandra or MongoDB myself, the CI legs for them are green.

The manual entry now matches your measurements. The 2 December strings, the 3 December strings ("yes", "y", "n") and the other cases taken from ConsistentRead and similar members are separate, and the entry says CreateTable was not sent an Enabled string. The ten strings in BOOLEAN_TEXTS agree with it.

The TableClass bodies are on #1109: the UpdateTable and CreateTable rows with BillingMode BOGUS, TableClass BOGUS and a member of the wrong JSON type, with the Unexpected field type answer and the date of each run. The head of this PR answers the table class sentence for both, and #1109's change covers them.

I approve #1114 at 7b0f3db.

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.

2 participants