Repository navigation
fix(streams, update-table): CreationRequestDateTime; measured UpdateTable sentences and validation order - #548
Open
LeeroyHannigan wants to merge 2 commits into
Open
LeeroyHannigan wants to merge 2 commits into
LeeroyHannigan wants to merge 2 commits into
Conversation
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
requested review from
amrith,
c33howard,
jcshepherd,
pdf-amzn,
robinnsc and
yesyayen
as code owners
October 25, 2026 12:02
This was referenced Oct 25, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three measured sentence and shape fixes on the stream and
UpdateTablepaths, found while reviewing #515. Every expected answer was measured on Amazon DynamoDB on 2026-10-24 and 2026-10-25; the rows are in the wire tests.Closes #517, closes #519, closes #520.
Change
#517.
DescribeStreamreturnsCreationRequestDateTimeon every stream, enabled or disabled; ExtendDB omitted it on every backend. The value is derived from the stream label:stream_label_creation_date_time(crates/storage/src/util/arn.rs) parses the 23-byte label every backend writes today 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 and never re-enabled reports the member too. The engine sets it inhandle_describe_stream, the one response-boundary site, 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; on ExtendDB the two name the same millisecond.#519.
UpdateTablewithStreamEnabled: trueand noStreamViewTypenow answers the service'sIf stream is being enabled then UpdateViewType is required. The service reports a defective GSICreateand aPROVISIONEDbilling mode without throughput before the missing view type, and the view type before the table lookup; the check moved to after the billing and index rules. The throughput sentence is now the service'sProvisionedThroughput must be specified when BillingMode is PROVISIONED(ExtendDB saidwhen changing BillingMode to PROVISIONED).#520. A GSI
Createwhose key attribute is not inAttributeDefinitionsgets one of three sentences by the member's shape: absent,AttributeDefinitions is not specified for index: <name>(the firstCreatein request order, even when the key is the table's own hash key); present and lacking the key, theKeys: [..], AttributeDefinitions: [..]sentence; present and empty,Invalid KeySchema: Some index key attribute have no definition. ExtendDB rendered the second for every shape. TheCreateTablepath is untouched; it has its own copy of the check incrates/core.The
update_tableunit tests moved tocrates/engine/src/update_table_tests.rsunchanged (the file had crossed 600 lines).Tests
tests/python/test_update_table_sentences.py(8 rows, dual-target): the two UpdateTable: the missing StreamViewType sentence differs from the service #519 shapes, the three UpdateTable GSI create on an undefined key attribute: sentence differs from the service #520 shapes, theCreateTableshape, and the two validation-order rows. 8 of 8 on the live service and on a SQLite dev-mode server.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 equals the label's instant. The row accepts an omittedStreamSpecificationafter the disable, which is what the service returns and what fix(streams): disabling a stream closes its shards; enabling makes a new one #515 brings to ExtendDB.mainfails 5 of the 7 rows that existed at the time and passes the 2 that encode behaviourmainalready had.Measured, not changed here
Keys: [..]andAttributeDefinitions: [..]lists: on the serviceKeyscarries every key of the index (not the missing one), two missing keys with a non-empty member isInvalid KeySchema, and both lists come out in an order that is neither the request's nor alphabetical. Pre-existing on both theCreateTableandUpdateTablepaths; filed separately. The rows here use one-key shapes where the order does not arise.AttributeDefinitionsthat redefines the table's own key with another type is accepted by the service, which keeps the original type; a duplicated definition is refused withAttribute Name is duplicated: <name>. ExtendDB accepts both. Filed separately.Merge notes for #515
Six files conflict with
fix/482-stream-disable-closes-shards; the resolution: drop #515's inline enable check inhandle_update_table(this branch'svalidate_stream_specificationcarries the measured sentence and runs after the index rules) and keep #515's disable rule after it; keep bothvalidate_stream_specificationandstream_change_companion; union the two test blocks inupdate_table_tests.rs; take #515's side for the four backenddescribe_streambodies and addcreation_request_date_time: None,to the oneStreamDescriptionliteral instream_lineage.rs. After both land:stream_lineage::label_millisandstream_label_creation_date_timeparse the same label, so one parser should define the shape and carry the 19-byte arm; #515's storage-side copy of the view-type rule still has the old sentence (unreachable, since the engine check runs first) and should take the measured one; and the #517 wire row gainsassert desc["StreamStatus"] == "DISABLED"on the post-disableDescribeStream, which no backend answers before #515.