Skip to content

fix(streams/update-table): CreationRequestDateTime, and measured UpdateTable sentences and validation order - #548

Open
LeeroyHannigan wants to merge 14 commits into
mainfrom
fix/517-519-520-stream-update-table-sentences
Open

LeeroyHannigan wants to merge 14 commits into
mainfrom
fix/517-519-520-stream-update-table-sentences

Conversation

@LeeroyHannigan

@LeeroyHannigan LeeroyHannigan commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Changes since the last review

  • 248f5a293 merges main at a417b2f82. In crates/engine/src/streams_tests.rs it keeps this branch's describe_stream_output_carries_creation_request_date_time and main's removal of at_sequence_number_padding, which main moved to streams_iterator_params.rs.
  • 484c0f42c turns tests/python/test_update_table_sentences.py into data tables with one parametrized test each. Every row keeps its request members and its expected message. The two UpdateTable: the missing StreamViewType sentence differs from the service #519 order rows now go to a table name that does not exist, where the service answers them too.
  • ae5072c41 checks the index rules and the view type before the WarmThroughput rule (review thread on update_table.rs:151).
  • 0598f8e26 answers Invalid KeySchema whenever AttributeDefinitions has fewer entries than the created index has keys, and lists every key of the index otherwise (thread on gsi_updates.rs:259).
  • 34b6c92c9 adds a storage test for the enable sentence of stream_change (thread on stream_lineage.rs:98).
  • f3c65cd56 names the releases that wrote the 19-byte stream label (thread on arn.rs:66).
  • 7fbb1bd2a folds the nine rows that go to a table name that does not exist into one data table, NEVER_CREATED_ROWS, with an operation column.

What

Three measured fixes on the stream and UpdateTable paths.

#517: DescribeStream returns CreationRequestDateTime on every stream, enabled or disabled. ExtendDB omitted it on every backend. The value comes from the stream label. stream_label_creation_date_time (crates/storage/src/util/arn.rs) parses two labels:

  • the 23-byte label that every backend writes today
  • the 19-byte label that PostgreSQL wrote from v0.1.0, SQLite from v0.1.3 and MongoDB from v0.1.4, each up to v0.1.13

So a stream enabled on those versions and never re-enabled reports the member too. Cassandra first appears at v0.1.14, which writes the 23-byte label. The engine sets the member in handle_describe_stream, so all four backends return it. On the service the member is a stored request time. It preceded the label's instant by 0 to 13 ms in three measurements. On ExtendDB the two name the same millisecond.

#519: UpdateTable with StreamEnabled: true and no StreamViewType now answers the service's If stream is being enabled then UpdateViewType is required. Main answered StreamViewType must be specified when StreamEnabled is true. The service reports a billing fault and a defective GSI Create before the missing view type. It reports a defective GSI Create and the missing view type before the WarmThroughput rule and the table lookup. UpdateTable now checks the billing rules, then the index rules, then the view type, then the WarmThroughput rule. Main checked the view type first and the index rules after the WarmThroughput rule. The throughput sentence is now the service's ProvisionedThroughput must be specified when BillingMode is PROVISIONED. Main said when changing BillingMode to PROVISIONED.

#520: A GSI Create gets one of three sentences when AttributeDefinitions does not cover its key schema, by the shape of the member:

  • absent: AttributeDefinitions is not specified for index: <name>, for the first Create in request order, even when the key is the table's own hash key
  • fewer entries than the created index has keys, an empty list included: Invalid KeySchema: Some index key attribute have no definition
  • otherwise: Some index key attributes are not defined in AttributeDefinitions. Keys: [..], AttributeDefinitions: [..], with every key of the index and every definition

Main gave the third sentence for every shape, with the first missing key only. The CreateTable path keeps its own copy of the check in crates/core, and this PR does not change it.

No file under docs/ describes these answers or the member.

Why

ExtendDB answered these requests differently from Amazon DynamoDB. The review of #515 found them. Every expected answer comes from a measurement on the service in us-east-1, on 2026-10-24, 2026-10-25 or 2026-11-25.

Closes #517, closes #519, closes #520.

Changes against main

Besides the sentences above, these requests get another answer than on main:

  • WarmThroughput, another change that the WarmThroughput rule refuses (such as BillingMode) and a defective GSI update: main answered that rule's sentence for the other change, for example WarmThroughput must be the only operation in the request beside BillingMode. This branch answers the index sentence. For a GSI Create without AttributeDefinitions beside BillingMode, the service answers AttributeDefinitions is not specified for index: <name> too (measured 2026-11-25).
  • A stream enable without a view type beside a billing fault or a defective GSI Create: main answered its view type sentence. This branch answers the billing or index sentence, as the service does.

Related behaviour

Merging

The branch has main at a417b2f82 merged in. Against #963 the merge conflicts in crates/engine/src/update_table.rs. This branch moves the validate_gsi_updates call in handle_update_table above the WarmThroughput rule, and #963 changes the stream companion block right after that call. To resolve it, keep this branch's order of the three calls, then #963's version of the block. This head merges cleanly with #1074 and #485.

Testing done

Wire rows, all asserting the status, the error code and the full message by equality:

  • tests/python/test_update_table_sentences.py, 14 rows in three parametrized tests. Two view type rows and three AttributeDefinitions member shapes run on a table. Six order rows, two more UpdateTable member shapes and the CreateTable listing row are one table, NEVER_CREATED_ROWS. They send the measured requests to a table name that does not exist.
  • tests/python/test_streams.py::TestDescribeStream::test_creation_request_date_time_is_the_label_instant: the member is present on an enabled stream and after a disable, and it equals the label's instant. After the disable, DescribeTable omits StreamSpecification and DescribeStream reports DISABLED.
  • tests/python/test_stream_disable_fold.py::test_the_index_definition_check_precedes_the_companion_rule asserts the whole message.

Results on a SQLite build of 7fbb1bd2a:

  • test_update_table_sentences.py, test_streams.py, test_stream_disable_fold.py, test_warm_throughput_updates.py, test_warm_throughput.py, test_stream_disable_validation.py and test_stream_disable.py: 104 passed, 4 xfailed.
  • Control: the same head with main's production files for every Rust file this PR changes fails 14 of these 16 rows. It passes the two one-key listing rows, which main already got right.
  • Control: the merge 248f5a293 has this branch's previous validation code. It fails the six rows that the fix commits add and passes the other eight.

Unit tests:

  • creation_date_time_is_the_label_instant (five labels, the 19-byte one included) and creation_date_time_refuses_other_shapes (11 shapes) in arn.rs
  • a_created_gsi_on_an_undefined_key_attribute_is_refused_by_member_shape (five rows) in gsi_updates.rs
  • describe_stream_output_carries_creation_request_date_time, enabling_a_stream_without_a_view_type_is_refused and an_enable_without_a_view_type_is_the_measured_sentence
  • With main's sentence put back in the enable arm of stream_change, the last one fails and the other 33 storage stream tests pass.
  • cargo test --lib: core 1166, engine 893 and storage 291 passed.

Gates on core, engine and storage at 7fbb1bd2a: cargo +1.97.0 fmt --all -- --check, both clippy commands of .github/workflows/clippy.yml with -D warnings, and cargo +1.91.1 check --all-targets are clean. The native run of the WebAssembly parity test (cargo test -p extenddb-wasm-adapter --test parity) passes. The build and clippy steps of devtools/run-wasm-step pass with toolchain 1.97.0 and clang 14 at f3c65cd56. This head changes only a Python file after it. python3 -m pytest --collect-only -q collects tests/ and tests/python with no error.

The five rows that need a table ran on the service in their earlier form. This revision of the file was not run against the service, because those rows create tables.

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

None. A client gets the service's sentences in place of ExtendDB's for the requests above, and DescribeStream returns one more member, CreationRequestDateTime.


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.

The service returns CreationRequestDateTime in StreamDescription on every
stream, enabled or disabled (measured 2026-10-24). ExtendDB omitted it on
every backend.

The value is derived from the stream label rather than stored.
stream_label_creation_date_time parses the 23-byte label format_stream_label
writes and the 19-byte label SQLite, PostgreSQL and MongoDB wrote on v0.1.3
to v0.1.13 and Cassandra up to v0.1.14, so a stream enabled on those
versions reports the member too. The engine sets the member in
handle_describe_stream, so all four backends return it. On the service the
member is a stored request time that preceded the label's instant by 0 to
13 ms in three measurements (2026-10-25); on ExtendDB the two name the same
millisecond.

Fixes #517
… GSI without definitions

UpdateTable StreamSpecification {StreamEnabled: true} with no StreamViewType
is refused by the service with "One or more parameter values were invalid:
If stream is being enabled then UpdateViewType is required" (measured
2026-10-24 on a never-streamed table and on a table whose stream is
enabled). ExtendDB said "StreamViewType must be specified when StreamEnabled
is true". The service reports a Create whose key attribute has no definition,
and a PROVISIONED billing mode with no ProvisionedThroughput, before the
missing view type, and the view type before the table lookup (measured
2026-10-25); the check now runs after the billing and index rules and before
the backend call. The throughput sentence is the service's:
"ProvisionedThroughput must be specified when BillingMode is PROVISIONED".

An UpdateTable GlobalSecondaryIndexUpdates Create whose key attribute is not
defined is refused by the service with one of three sentences by the shape
of AttributeDefinitions (measured 2026-10-25): member absent,
"AttributeDefinitions is not specified for index: <name>", naming the first
Create in request order; member present and lacking the key, "Some index key
attributes are not defined in AttributeDefinitions. Keys: [..],
AttributeDefinitions: [..]"; member present and empty, "Invalid KeySchema:
Some index key attribute have no definition". ExtendDB rendered the second
sentence for every shape. The UpdateTable check has its own rendering in the
engine and does not call core's CreateTable validation, so the CreateTable
sentence is unchanged.

The update_table tests move to update_table_tests.rs unchanged.

Fixes #519
Fixes #520
@LeeroyHannigan
LeeroyHannigan force-pushed the fix/517-519-520-stream-update-table-sentences branch from 8e3d8f0 to 6eff502 Compare October 30, 2026 09:07
@navareamol navareamol added the v1 Needed for the 1.0 release label Nov 3, 2026
@navareamol navareamol added this to the 1.0 milestone Nov 3, 2026
crates/storage/src/util/mod.rs keeps the shard-does-not-exist exports from main and the stream_label_creation_date_time export from this branch.
crates/storage-cassandra/src/stream_engine.rs, crates/storage-mongodb/src/stream_engine.rs, crates/storage-postgres/src/stream_engine.rs and crates/storage-sqlite/src/stream.rs keep the describe_stream bodies from main. Those bodies build the description in stream_lineage::describe_stream. The creation_request_date_time field this branch added to each backend literal moves to that one literal in crates/storage/src/stream_lineage.rs.
crates/engine/src/streams.rs keeps the streams_tests.rs module from main and the CreationRequestDateTime derivation from this branch. The unit test for it moves to crates/engine/src/streams_tests.rs.
crates/engine/src/update_table.rs keeps the disable rule, the WarmThroughput only-operation rule and the stream companion rule from main. From this branch it keeps the measured enable sentence in validate_stream_specification and the measured ProvisionedThroughput sentence. The enable check runs after the index rules and before the companion rule. The index key definition sentences from this branch move to crates/engine/src/gsi_updates.rs, where main moved validate_gsi_updates.
crates/engine/src/update_table_tests.rs keeps the tests from main and the view type test from this branch. The member shape test for index key definitions moves to the gsi_updates tests.
Main added stream_lineage::label_millis, which reads the 23-byte stream label as epoch milliseconds for the shard ids. This branch added stream_label_creation_date_time with its own parser of the same label. The second parser goes. stream_label_creation_date_time now calls label_millis and keeps the 19-byte arm for the labels earlier releases wrote, by giving them a .000 fraction first.
Main's stream_change refuses an enable without a view type with the engine's old sentence, and its comment says the engine still answers that sentence. This branch moved the engine to the measured sentence, "If stream is being enabled then UpdateViewType is required". The storage arm now carries the same sentence, so the one condition has one message. The arm stays unreachable through the engine, which checks it first.
The engine's validate_stream_specification and storage's stream_change each wrote out the sentence for an UpdateTable that enables a stream without a view type. The sentence now lives once, as stream_lineage::STREAM_VIEW_TYPE_REQUIRED, and both sites read it. The engine unit test keeps the literal, so the constant stays checked against the measured text.
Main drops a disabled StreamSpecification from DescribeTable on every backend and reports the stream DISABLED. The CreationRequestDateTime wire row accepted either DescribeTable shape and did not check the stream status. It now asserts the member is absent and the status reads DISABLED.

The fold row sends an index Create without AttributeDefinitions beside a stream change. Its comment said ExtendDB still answered its own sentence for an undefined index key, so the row checked only the order. This branch answers the service's sentence for that shape, so the row asserts the whole message.

@demohan demohan 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.

The new sentences match the service. Each shape below was sent twice to the service in us-east-1 and to SQLite builds of this head and of main 89fc971; main differs on each.

  • The view-type sentence answers on a never-streamed table, a stream-enabled table and a missing table, ahead of the table lookup and the already-enabled check.
  • The when BillingMode is PROVISIONED sentence, the order against the billing and index rules with eight valid companion changes, and all three #520 sentences by member shape, including the first Create named and the table's own hash key.
  • CreationRequestDateTime has the service's key set in all four states (created by CreateTable, enabled by UpdateTable, disabled, and the old stream after a re-enable), is absent from ListStreams and DescribeTable, and equals the label instant on SQLite and on PostgreSQL with the database in America/Los_Angeles. A 19-byte label rewritten into the old form parses end to end on both backends.

Gates are clean on 1.97.0 and on the 1.88 MSRV, the eight new wire rows pass twice on the service and pass on the SQLite and PostgreSQL builds (72 passed, 4 xfailed), CI is green, and the negative controls fail apart from the two noted below.

I will approve once the view-type order and the KeySchema sentence follow the service, with rows that pin them.

crates/engine/src/gsi_updates.rs:1

The file grows from 569 to 646 lines. Moving its tests to a sibling file would keep it under 600.

@@ -160,6 +151,7 @@ pub async fn handle_update_table(
extenddb_core::validation::validate_warm_throughput_is_only_operation(&input)?;

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.

The view-type check now runs after validate_warm_throughput_is_only_operation, and the service runs it first. Twice each, on an existing and a missing table:

  • StreamSpecification: {StreamEnabled: true} with no view type, plus WarmThroughput: the service answers If stream is being enabled then UpdateViewType is required, and head answers WarmThroughput must be the only operation in the request.
  • Adding DeletionProtectionEnabled: head answers DeletionProtection modification must be the only operation.
  • Adding a GSI Create with no AttributeDefinitions: the service answers AttributeDefinitions is not specified for index: idx1, and head answers the warm sentence.

The measured order is the billing rules, the index rules, the view type, then the warm rule. Running validate_gsi_updates and validate_stream_specification ahead of the warm check would match; wire rows for these three shapes, and a rerun of the 2026-10-23 warm rows, would hold it.

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.

Fixed in ae5072c: validate_gsi_updates and validate_stream_specification now run before validate_warm_throughput_is_only_operation.

The three shapes from this thread are rows of NEVER_CREATED_ROWS in tests/python/test_update_table_sentences.py, sent to a table name that does not exist. A fourth row sends WarmThroughput, BillingMode PAY_PER_REQUEST and a GSI Create without AttributeDefinitions. The service answers it with the index sentence (measured 2026-11-25), and main answered the warm sentence. The four rows fail on the previous head and pass here.

test_warm_throughput.py and test_warm_throughput_updates.py pass on a SQLite build of this head. I did not rerun them on the service, because they create tables.

Comment thread crates/engine/src/gsi_updates.rs Outdated
create.index_name
)));
}
Some(defs) if defs.is_empty() => {

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.

The service answers Invalid KeySchema: Some index key attribute have no definition whenever AttributeDefinitions has fewer entries than the created index has keys, not only when it is empty. Twice each, for an index on g and r:

  • [g]: the service answers Invalid KeySchema, and head answers Keys: [r], AttributeDefinitions: [g].
  • [other] and [r]: the service answers Invalid KeySchema, and head answers the Keys: sentence.
  • [pk, x]: the service answers the Keys: sentence.

So the rule turns on the list's length, not on the number of missing keys the body and #554 describe. Guarding on defs.len() < create.key_schema.len() would match. The unit rows at :597 and :603 assert the current answers as measured ones; wire rows for [g] and [pk, x] would pin both sides.

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.

Fixed in 0598f8e. The guard is now defs.len() < create.key_schema.len(), and the listing names every key of the index.

In a_created_gsi_on_an_undefined_key_attribute_is_refused_by_member_shape, [g] and [other] now expect Invalid KeySchema. A new row for [r, pk] with keys r HASH and g RANGE expects Keys: [r, g], AttributeDefinitions: [r, pk], as the service answers. NEVER_CREATED_ROWS in tests/python/test_update_table_sentences.py has wire rows for [g] and for that [r, pk] shape, both by equality.

The [pk, x] row is in #595 and not here. The service answers Keys: [r, g], AttributeDefinitions: [x, pk] for it, and this branch keeps key schema order and request order. #595 renders the lists in the service's order (#554).

// Unreachable through the engine, whose `validate_stream_specification`
// refuses an enable without a view type before storage with this same
// sentence, and before the already-enabled check.
(true, false) => requested

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.

No test checks this sentence. With the old sentence put back, the 31 storage stream tests and every wire row pass.

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 34b6c92. an_enable_without_a_view_type_is_the_measured_sentence in stream_lineage_tests.rs calls stream_change with an enable and no view type, once with no stored specification and once with a disabled one. It asserts the sentence by equality. With the old sentence put back in the arm, that test fails and the other 33 storage stream tests pass.

{
return Err(DynamoDbError::ValidationException(
"One or more parameter values were invalid: ProvisionedThroughput must be specified when changing BillingMode to PROVISIONED".to_owned(),
"One or more parameter values were invalid: ProvisionedThroughput must be specified when BillingMode is PROVISIONED".to_owned(),

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.

The 12 update_table unit tests pass with this sentence reverted; only the wire ordering row catches it.

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.

The wire row missing-throughput-before-the-view-type of NEVER_CREATED_ROWS in tests/python/test_update_table_sentences.py asserts this sentence by equality. CI runs that file in the --comprehensive suite (devtools/run-tests --extenddb --pytest --comprehensive, .github/workflows/integration.yml lines 246 and 425), and the MongoDB and Cassandra jobs run it too. A server built with the old sentence fails that row. The check reads the request inside handle_update_table, so a unit test would only repeat the sentence that the wire row holds.

Comment thread crates/storage/src/util/arn.rs Outdated
/// Two shapes are accepted: the 23-byte `YYYY-MM-DDThh:mm:ss.sss` this module
/// writes, parsed by [`crate::stream_lineage::label_millis`], and the 19-byte
/// `YYYY-MM-DDThh:mm:ss` that SQLite, PostgreSQL and MongoDB wrote on v0.1.3
/// to v0.1.13 and Cassandra up to v0.1.14, which a stream enabled on those

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.

The version ranges for the 19-byte label do not match the tags. PostgreSQL wrote it from v0.1.0, MongoDB first appears at v0.1.4, and Cassandra first appears at v0.1.14 with the 23-byte label already. Every range ends at v0.1.13. The code is unaffected.

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.

Fixed in f3c65cd. The doc and the test comment now give the writers of the 19-byte label. PostgreSQL wrote it from v0.1.0, SQLite from v0.1.3 and MongoDB from v0.1.4, each up to v0.1.13. Cassandra is no longer in the list: v0.1.14 writes the 23-byte label on every backend. The commit message and the PR body give the same ranges.

crates/engine/src/streams_tests.rs keeps the describe_stream_output_carries_creation_request_date_time test from this branch. Main's deletion of at_sequence_number_padding stays: main moved that test to crates/engine/src/streams_iterator_params.rs.

Every StreamDescription literal in the merged tree sets creation_request_date_time: the one in crates/storage/src/stream_lineage.rs and the one in streams_tests.rs. The second test literal copies it from the first.
tests/python/test_update_table_sentences.py had one test function per measured row. Its eight rows are now four data tables, each with one parametrized test:

- the view type rows, on a never-streamed and a stream-enabled table
- the two order rows of #519
- the three AttributeDefinitions member shapes, on a table
- the CreateTable listing row

Each row keeps its request members and its expected message.

The two #519 order rows now go to a table name that does not exist, as the CreateTable row already did. The service answers both before the table lookup (measured 2026-11-25, twice each, on a name that does not exist).
This branch ran validate_gsi_updates and validate_stream_specification after validate_warm_throughput_is_only_operation, so each request below got an only-operation sentence. The service checks both first. It answers the sentence after each colon (measured 2026-11-25, twice each, on a table name that does not exist):

- StreamSpecification {StreamEnabled: true} with no view type, plus WarmThroughput: "If stream is being enabled then UpdateViewType is required"
- the same plus DeletionProtectionEnabled: the same view type sentence
- the first request plus a GSI Create without AttributeDefinitions: "AttributeDefinitions is not specified for index: idx1"
- WarmThroughput, BillingMode PAY_PER_REQUEST and a GSI Create without AttributeDefinitions: the same index sentence

UpdateTable now checks the billing rules, then the index rules, then the view type, then the WarmThroughput rule. Main answered the WarmThroughput sentence for the last request too. It now gets the service's index sentence.

The four requests are rows of TestValidationOrder in tests/python/test_update_table_sentences.py.
…KeySchema

For an UpdateTable GSI Create, this branch answered "Invalid KeySchema: Some index key attribute have no definition" only when AttributeDefinitions was empty. The service answers it whenever the member has fewer entries than the created index has keys. For an index on g HASH and r RANGE, the definitions [g], [r] and [other] each get it. (Measured 2026-11-25, twice each, on a table name that does not exist.) This branch listed the missing key instead.

When the member is not shorter than the key schema and a key is still undefined, the service lists every key of the index. For keys r HASH and g RANGE with the definitions [r, pk] it answers "Keys: [r, g], AttributeDefinitions: [r, pk]". This branch answered "Keys: [g]". The listing now names every key of the index, in key schema order, and every definition, in request order. The service orders a list of two or more names in another way. For keys g and r with the definitions [pk, x], it answers "Keys: [r, g], AttributeDefinitions: [x, pk]".

The unit table in gsi_updates.rs and two rows of TestIndexKeyAttributeUndefined in tests/python/test_update_table_sentences.py hold both rules.
…a view type

No test called stream_change with an enable and no view type, so main's old sentence put back in that arm passed every storage stream test. The new test sends that request against a table with no stream specification and against a disabled one. It asserts the measured sentence by equality: "One or more parameter values were invalid: If stream is being enabled then UpdateViewType is required". With main's sentence back in the arm, the test fails and the other 33 storage stream tests pass.
The doc of stream_label_creation_date_time and its test comment gave the wrong releases for the 19-byte YYYY-MM-DDThh:mm:ss label. The message of the commit that added them did too. The release tags show these writers:

- PostgreSQL, from v0.1.0 to v0.1.13 (to_char(NOW(), 'YYYY-MM-DD"T"HH24:MI:SS'))
- SQLite, which first appears at v0.1.3, up to v0.1.13 (strftime('%Y-%m-%dT%H:%M:%S','now'))
- MongoDB, which first appears at v0.1.4, up to v0.1.13 (its own format_stream_label)

Cassandra first appears at v0.1.14, which writes the 23-byte label on every backend. This commit does not change the parser.
…answers

tests/python/test_update_table_sentences.py had two tables of rows that go to a table name that does not exist. TestValidationOrder held the six order rows. TestIndexKeyAttributeUndefined held the two UpdateTable member shapes and the CreateTable listing row. Both tables compared the message by equality, and the second had an operation column.

The nine rows are now one table, NEVER_CREATED_ROWS, with the operation column, and one parametrized test, test_on_a_name_no_table_has. Each row keeps its request members and its expected message. The five rows that need a table stay in their two classes.
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

The view type order is in ae5072c and the Invalid KeySchema rule in 0598f8e. The rows that pin them are in NEVER_CREATED_ROWS and TestIndexKeyAttributeUndefined of tests/python/test_update_table_sentences.py, by equality. The branch also has main merged at a417b2f (248f5a2), and the file's rows are now data tables (484c0f4).

On the size of gsi_updates.rs: CONTRIBUTING.md sets no length limit for a source file. At this head gsi_updates.rs has 642 lines, and #595, which is stacked on this branch, takes it to 628. The test module runs from line 293 to the end. #1137 changes that module, and 14 open PRs are stacked on #1137. A move of the module to a sibling file would conflict with #1137 and with every branch built on it. The module stays where it is in this PR.

@demohan demohan 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.

The view-type order and the KeySchema sentence follow the service at 7fbb1bd, and rows pin them.

  • With StreamEnabled: true, no view type and WarmThroughput, this head answers If stream is being enabled then UpdateViewType is required as the service does, on a never-streamed table, a stream-enabled table and a missing one, and with DeletionProtectionEnabled, TableClass, SSESpecification, OnDemandThroughput, a GSI Delete or ProvisionedThroughput beside it. Across 25 pairs of WarmThroughput, one other change and an index defect, the service and this head both answer the index rule. A GSI Create with fewer definitions than index keys answers Invalid KeySchema: Some index key attribute have no definition, per Create in request order, and otherwise the Keys: sentence. Each shape went twice to the service in us-east-1 and to SQLite and PostgreSQL builds of this head; the nine NEVER_CREATED_ROWS match the service 9 of 9.
  • Restoring the reviewed call order fails exactly the four order rows, and moving either call alone fails only its rows. is_empty(), <= or listing only the first missing key each fails a wire row and a unit row. The stream_change test fails with the old sentence, and the throughput wire row fails with its sentence reverted.
  • Streams written by v0.1.13 on SQLite and on PostgreSQL with the database in America/Los_Angeles answer CreationRequestDateTime at the label's UTC instant after extenddb migrate, enabled or disabled, and their records still read; the release ranges in arn.rs match the tags.
  • fmt, both clippy forms and the 1.91.1 check are clean, 2354 tests pass, and the branch merges cleanly with main. Of the two failing CI jobs, wasm fails building main's crates/core changes from #398, and mongodb-rust fails secmem::tests::init_refuses_under_a_low_memlock_limit_then_starts_unlocked in crates/auth, which this branch does not touch.

@LeeroyHannigan LeeroyHannigan changed the title fix(streams, update-table): CreationRequestDateTime; measured UpdateTable sentences and validation order fix(streams/update-table): CreationRequestDateTime, and measured UpdateTable sentences and validation order Dec 2, 2026

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

v1 Needed for the 1.0 release

Projects

None yet

3 participants