Repository navigation
fix: answer UPDATING while an UpdateTable change applies - #1093
Conversation
Amazon DynamoDB answers TableStatus UPDATING to an UpdateTable that changes ProvisionedThroughput, BillingMode, TableClass or StreamSpecification. A DescribeTable sent right after the change reports UPDATING too. The table reports ACTIVE again once the change applies. The service answers ACTIVE to a DeletionProtectionEnabled, OnDemandThroughput or WarmThroughput change alone. While a capacity change applies, it refuses another capacity change with ResourceInUseException. In that time it serves a DeletionProtectionEnabled change, PutItem, CreateBackup and UpdateTimeToLive. The answers were measured in us-east-1 on 13, 14 and 17 Nov 2026. ExtendDB answered ACTIVE to these changes on all four backends. Each backend keeps the stored status ACTIVE and writes now plus control_plane_delay_seconds to status_transition_at. DescribeTable reports UPDATING until that instant passes, as does the response to the change that set it. UpdateTable refuses a BillingMode or ProvisionedThroughput change before that instant with the service's ResourceInUseException message. Fixes #1043.
The snapshot tests stood for a table that is not ACTIVE by writing UPDATING into the catalog. No backend stores UPDATING now. A MongoDB snapshot reads the reported status, so an UPDATING row opened as an ACTIVE table does, and two MongoDB tests failed. The fixtures now write CREATING, which every backend refuses. The trait doc of open_table_snapshot names UPDATING beside ACTIVE.
In `crates/storage-sqlite/src/update_table.rs` both sides add a block before the commit of `update_table`: main's refusal of a vector index on the WebAssembly build (#1009) and this branch's `status_transition_at` write. The merge keeps both, the refusal first, so a refused request writes nothing.
On SQLite and Cassandra, a table description read a stored status_transition_at that it could not parse as no UPDATING window, and reported the table ACTIVE. It now fails with StorageError::Internal, as it does for an unknown table_status in the same row. Every SQLite writer of the column stores RFC 3339 text. The Cassandra column has the timestamp type, which the driver reads as an i64. So only a row that another program changed gets the error.
These docs now describe the UPDATING time: - docs/differences-from-dynamodb.md, the control_plane_delay_seconds row of the runtime settings table - docs/manuals/12-extending-extenddb-storage.md, the table lifecycle - docs/design/04-component-storage.md, sections 6.1 and 6.1.1 Section 6.1 said that UpdateTable sets table_status to UPDATING atomically. Now it says that the stored status stays ACTIVE, and that the description reports UPDATING until the instant in status_transition_at. It also says that the engine reads the status before the backend writes the change. Two capacity changes sent at the same moment can then both apply.
…-time The base branch now holds origin/main a417b2f and two more commits of #1093. One hunk of crates/storage-sqlite/src/update_table.rs conflicted, before the commit of update_table_impl. The base adds main's refusal of a vector index create on the WebAssembly build, then its own status_transition_at write under enters_updating. This branch writes status_transition_at from updating_until, which it computes earlier in the same transaction. The merge keeps the WebAssembly refusal first and this branch's write after it, and drops the write of the base. A refused request then writes nothing.
LJMart11
left a comment
There was a problem hiding this comment.
Reviewed at 07929ee. Engine, storage and Cassandra lib tests passed, and the UpdateTable status, stream-disable and warm-throughput pytest files passed against a PostgreSQL server at the default delay. The theme is upgrade documentation for the new UPDATING window.
Docs — outside the diff
docs/manuals/07-upgrade-manual.md:385— The two changes this PR lists under Breaking changes have no entry under Behavior Changes by Release. One is UpdateTable and DescribeTable answering UPDATING. The other is a second ProvisionedThroughput or BillingMode change getting ResourceInUseException where the earlier release applied it. Against a PostgreSQL server of this head at the defaultcontrol_plane_delay_secondsof 0.25, 5 of 5 second ProvisionedThroughput changes sent 13 to 23 ms after the first gotResourceInUseException(Table IOPS are currently being updated). A switch to PAY_PER_REQUEST sent 0.4 s later was accepted. An entry here naming both changes and the setting that sets the window would close this.
navareamol
left a comment
There was a problem hiding this comment.
I ran this head on SQLite, PostgreSQL and Cassandra with control_plane_delay_seconds set to 30. Three things:
-
Capacity changes sent at the same moment all apply. I sent 8
ProvisionedThroughputchanges from 8 clients released together, five rounds per backend. Applied out of 8: SQLite 7, 3, 2, 1, 2; PostgreSQL 3, 8, 8, 8, 8; Cassandra 1, 8, 8, 8, 6. The engine reads the status before the backend writesstatus_transition_at, so the refusal only holds for requests that arrive after the first one commits. The Breaking changes section says a second change inside the window getsResourceInUseExceptionwithout that condition. Could the check move into the backend write? PostgreSQL already takes the table row lock inupdate_table, SQLite runs it in one transaction, and the Cassandra table write already has an LWT condition that could includestatus_transition_at. -
A request that changes nothing opens the window.
enters_updatingandchanges_capacitylook at whether the member is present, not whether the value changes. On all three backends,ProvisionedThroughput5/5 on a 5/5 table,BillingMode: PAY_PER_REQUESTon an on-demand table andTableClass: STANDARDon a STANDARD table each answer UPDATING, DescribeTable says UPDATING, and a capacity change after the first two is refused for the window. Main answers ACTIVE to all three. Have you measured what the service answers to these? If it answers ACTIVE, I think the check needs to compare with the stored values. -
On Cassandra, DeleteTable inside a window now answers
TableStatus: UPDATING. The response is built from the row before the delete, which now goes throughreported_status. SQLite and PostgreSQL answer DELETING. The description says DeleteTable inside the window got the answer of an ACTIVE table on all four backends; that is not what this head does on Cassandra.
The red wasm check fails on main too, with the same errors in crates/core/src/metrics.
The branch has a merge conflict with main, so it needs a merge of main before it can land.
I will approve once 1 and 2 are fixed or answered with a measurement, and 3 is fixed or the description is corrected.
|
Checked at Fixed:
Disputed: none. Needs-human: none. |
…-time The merge takes b8f73c4 of #1093, which merges main at db8a90d. The last merge took c8cd082, with main at c057660. Between the two, #1531 merged into main. #1531 changed seven files, and the commits of #1207 change none of them, so git merged without a conflict. In docs/manuals/07-upgrade-manual.md, the v1.2.0 entry of #1531 now follows the entry of #1093.
|
@navareamol the push after your approval is one merge of main at db8a90d (#1531) into c8cd082. The PR's own changes are the same, file by file. CI is green at b8f73c4 after one rerun of the PostgreSQL deadlock test in |
Main fixed the control_plane_delay_seconds default in docs/differences-from-dynamodb.md to 0.25 (#1443). This branch adds UPDATING to the same row. The merge keeps the 0.25 default and this branch's description.
|
@navareamol I merged main again (f583547), because #1443 changed the default of |
navareamol
left a comment
There was a problem hiding this comment.
The two pushes after my approval are merges of main (b8f73c4 and f583547). Against its merge base the PR's own diff is the same as at c8cd082: 34 files, 1660 added and 186 removed, and the lines under crates are identical. The one other change is the control_plane_delay_seconds row in docs/differences-from-dynamodb.md, which keeps main's new default of 0.25 and adds this PR's UPDATING text. All 75 checks pass on f583547.
I approve.
Main added a v1.2.0 entry to the upgrade manual for #1093. The merge moves that entry into docs/manuals/upgrade-notes/1093-update-table-updating.md, with its heading less "v1.2.0: " and its body byte for byte. It keeps the manual of this branch, which has no v1.2.0 entry. Main changed the manual nowhere else since 5826e1b.
Main added a v1.2.0 entry to the upgrade manual for #1093, at the place where this branch adds its entry. The merge keeps both, main's first.
Main added the update_window test module (#1093) in crates/storage-mongodb/src/data_engine_live_tests.rs, where this branch adds put_race. The merge keeps both.
…-time The merge takes f583547, the last head of #1093 before main merged it as 1e2ebdd. The last merge took b8f73c4. Since then, #1093 merged main at 1174651, eight PRs past db8a90d: #1466, #1087, #768, #1296, #1485, #1228, #1325 and #1443. Git merged without a conflict. Two files of this branch have changes on both sides: - crates/storage/src/util/mod.rs: #1087 declares and exports scan_segment, and this branch declares and exports throughput. - docs/differences-from-dynamodb.md: #1443 changes the control_plane_delay_seconds default to 0.25 in two rows, and this branch adds the LastIncreaseDateTime row to the Control Plane table.
Main is at 1e2ebdd, two commits past 1174651: #1269 and the squash commit of #1093. The merge before this one took f583547, the last head of #1093, and the squash holds the same lines as that head. Nine files conflicted, in 37 hunks: - crates/engine/src/update_table_status_tests.rs has 8. - tests/python/test_update_table_status.py has 2. - crates/storage-sqlite/src/table_helpers.rs has 3, and update_table.rs has 6. - crates/storage-postgres/src/table_helpers.rs has 1, and update_table.rs has 9. - crates/storage-cassandra/src/table_helpers.rs has 1, and update_table.rs has 5. - crates/storage-mongodb/src/table_engine.rs has 2. In each hunk, the side of main holds the lines of #1093 as f583547 has them. The side of this branch holds its change to those lines. The merge keeps the side of this branch. Git merged three other files with no conflict: crates/core/src/types/table.rs, crates/storage/src/util/mod.rs and docs/differences-from-dynamodb.md. In each, main adds the lines of #1093, which this branch has, and this branch changes other lines. #1269 changes crates/storage-cassandra/tests/migrations/lock.rs, which is not a file of this branch. The diff of this branch against main has the same changed lines as its diff against b8f73c4 before the two merges.
Main is at 1e2ebdd, ten commits past db8a90d: #1466, #1087, #768, #1296, #1485, #1228, #1325, #1443, #1269 and the squash commit of #1093. One file conflicted: docs/manuals/07-upgrade-manual.md. #1093 adds its v1.2.0 entry at the top of "Behavior Changes by Release", where this branch has its entry. The merge keeps both entries without change. The entry of this branch stays first. The entry of #1093 comes next, above the other v1.2.0 entries of main. #1087 adds its entry after the other v1.2.0 entries of main, and git merged it with no conflict. Git merged four other files with no conflict: - crates/core/src/validation/mod.rs: #1228 adds the pattern clause for an empty value in validate_name_member. This branch declares the table_name_length module near the top of the file. - crates/server/src/table_name_gate.rs: #1296 adds has_no_table_member and an arm of check_table_name_chars for the six operations that have no table member. This branch checks none of those operations. - crates/wasm-adapter/parity/corpus.json: #1087 adds a Scan case, and #1228 changes the text of a ListBackups case. This branch changes other cases. - docs/manuals/10-security-model.md: #1325 adds the Content-Security-Policy line of the console. This branch changes the line on the requests that get an answer before the IAM decision.
Main is at 1e2ebdd, six commits past 44a7b79: #1485, #1228, #1325, #1443, #1269 and the squash commit of #1093. One file conflicted: crates/storage-mongodb/src/data_engine_live_tests.rs. #1093 declares the update_window module after delete_table, where this branch declares put_race and contention. The merge keeps all three declarations: update_window first, then the two of this branch. Git merged five other files with no conflict: - crates/storage-mongodb/src/snapshot_engine.rs: #1093 checks that a table serves with TableStatus::serves, and its tests set a table to CREATING instead of UPDATING. This branch builds a test engine with MongoEngine::for_test, at other lines. - crates/storage/src/error.rs: #1093 adds a sentence to the doc comment of IndexesInUse. This branch changes the doc comment of Transient. - crates/storage/src/lib.rs: #1093 declares update_window_conformance, and this branch declares request_clock. - docs/differences-from-dynamodb.md: #1443 changes the default delay to 0.25 s, and #1093 changes the row on stream disable and the row of the delay setting. This branch changes two rows near the top and adds the row on sustained contention. - docs/manuals/07-upgrade-manual.md: #1093 adds its v1.2.0 entry at the top of "Behavior Changes by Release". The entry of this branch stays after the v1.2.0 entries of main.
Main is at 1e2ebdd, six commits past 44a7b79: #1485, #1228, #1325, #1443, #1269 and the squash commit of #1093. One file conflicted: crates/storage-mongodb/src/data_engine_live_tests.rs. #1093 declares the update_window module after delete_table, where this branch declares the token module. The merge keeps both declarations: update_window first, then token. Git merged five other files with no conflict: - crates/core/src/validation/mod.rs: #1228 adds the pattern clause for an empty value in validate_name_member. This branch changes the index key checks, at other lines. - crates/storage/src/error.rs: #1093 adds a sentence to the doc comment of IndexesInUse, and this branch adds TransactionInProgress. - crates/storage/src/lib.rs: #1093 declares update_window_conformance, and this branch adds names to the transact exports. - docs/differences-from-dynamodb.md: #1443 changes the default delay to 0.25 s, and #1093 changes the row on stream disable and the row of the delay setting. This branch changes the row on index key validation. - docs/manuals/07-upgrade-manual.md: #1093 adds its v1.2.0 entry at the top of "Behavior Changes by Release". The entry of this branch stays after the v1.2.0 entries of main.
Main is at 1e2ebdd, eight commits past 5826e1b: #768, #1296, #1485, #1228, #1325, #1443, #1269 and the squash commit of #1093. Three files conflicted, in four hunks. In each hunk the UpdateTable window of #1093 meets the answer of this branch for a DELETING table: - crates/storage-postgres/src/update_table.rs and crates/storage-sqlite/src/update_table.rs have one hunk each. #1093 reads three more columns of the table row: the stored throughput, the table class and the window (in_window on PostgreSQL, stored_transition_at on SQLite). This branch answers a DELETING table with TableBeingDeleted right after UpdateTable reads the row. The merge keeps the wider read of #1093, then the DELETING check of this branch, then the check for a status other than ACTIVE. The window checks of #1093 come after that check, as on main. - crates/storage-mongodb/src/table_engine.rs has two hunks, both in require_active_table. #1093 makes the function return the catalog document of the table, and UpdateTable reads the window from it. This branch answers DELETING with TableBeingDeleted in a match on the status. The merge keeps that match, and its ACTIVE arm returns the document. The doc comment names the document and the three answers. A table has one stored status. #1093 reports UPDATING only for a stored ACTIVE table whose status_transition_at is later than now (reported_status in crates/storage/src/util/mod.rs). So no table is UPDATING and DELETING at the same time, and the merge does not choose between the two answers. Git merged six other files of this branch with no conflict: - crates/engine/src/update_table.rs: #1093 changes the doc comment of handle_update_table and declares the status_tests module. This branch maps TableBeingDeleted in update_table_err_to_dynamo. - crates/storage-cassandra/src/update_table.rs: #1093 reads status_transition_at and adds the window. This branch adds the same DELETING check before the check for a status other than ACTIVE. - crates/storage-postgres/tests/table_snapshot.rs: #1093 writes CREATING instead of UPDATING in two fixtures. This branch changes other tests. - crates/storage/src/error.rs: #1093 adds a sentence to the doc comment of IndexesInUse, and this branch adds TableBeingDeleted. - docs/differences-from-dynamodb.md: #1443 changes the default delay to 0.25 s, and #1093 changes the row on stream disable and the row of the delay setting. This branch adds the row on requests during a DELETING window. - docs/manuals/07-upgrade-manual.md: #1093 adds its v1.2.0 entry at the top of "Behavior Changes by Release". The entry of this branch stays after the v1.2.0 entries of main. The change of this branch to the entry of #1411 stays too.
Changes since the last review
The last reviews read
07929ee08. Since then:646258a66emergesmainatc057660361. One hunk ofcrates/engine/src/update_table.rsconflicted: main'scompanion.is_some()term of fix(streams): answer a stream change's companions as the service does #963 and this branch'schanges_capacityterm in the condition before the engine reads the table. The merge keeps both. sqlx 0.9.1 (fix(deps): move to sqlx 0.9.1 for the SQLite fix of RUSTSEC-2026-0459 #1166) refuses a query string that the code builds at run time. So the merge wraps the one in the SQLite test helpertable_withinsqlx::AssertSqlSafe. Main's fix(engine): describe a DELETING table with the members the service keeps #1411 makes DeleteTable answer DELETING on every backend, also inside a window. At07929ee08Cassandra answered UPDATING there.5b6e23a643: each backend refuses a capacity change inside a window in the write that would open the window. SQLite decides it under its write lock, and PostgreSQL under theFOR UPDATErow lock. On Cassandra the LWT of the tables row is conditional on thestatus_transition_atthat the request read, and on MongoDB the update filter matches that value. So of capacity changes sent at the same moment, one applies. A request now opens a window only when a member differs from the stored value. The engine handler is main's again, apart from its doc comment. The new checkextenddb_storage::update_window_conformanceruns on every backend.c1192d87bf: a v1.2.0 entry indocs/manuals/07-upgrade-manual.mdfor the two breaking changes below.c8cd0820ec: SQLite, Cassandra and MongoDB compare the stored end of the window with the clock directly.What
UpdateTable now answers
TableStatusUPDATING when the request changesProvisionedThroughput,BillingMode,TableClassorStreamSpecification. DescribeTable reports UPDATING until the change applies, then ACTIVE. The change applies aftercontrol_plane_delay_seconds.table_statusACTIVE. Each backend's update path writes now pluscontrol_plane_delay_secondstostatus_transition_at, on the clock that its CreateTable uses. The shared functionreported_statusreports UPDATING while that instant is in the future.ProvisionedThroughputwith the table's own units,BillingModewith the table's own mode andTableClasswith the table's own class. These requests answer ACTIVE, as before this change.enters_updatingcompares the request with the stored values.ResourceInUseExceptionwith the service's text:Attempt to change a resource which is still in use: Table IOPS are currently being updated. Table: <name>. Each backend decides this in the write that would open the window, under the lock or the condition of that write. So of such changes sent at the same moment, one applies and the others get this text.DeletionProtectionEnabledchange inside that time, and its response reports ACTIVE, as on DynamoDB. The response of every request that opens no window reports ACTIVE.TableStatus::serves.control_plane_delay_secondsof 0, the table stays ACTIVE.docs/differences-from-dynamodb.mdnow says so.extenddb catalog-checkand the control-plane workers see an ACTIVE table.status_transition_atdoes not parse, as it fails for an unknowntable_status. On SQLite, UpdateTable fails the same way before it writes.docs/differences-from-dynamodb.md,docs/manuals/12-extending-extenddb-storage.mdanddocs/design/04-component-storage.mddescribe the UPDATING time.docs/manuals/07-upgrade-manual.mdhas a v1.2.0 entry for it.Please use this What section as the squash commit message. The message of 07c8d38 says that a capacity change gets the IOPS text inside every window. ExtendDB answers that text inside every window, but the service answers it only inside the time that a capacity change opens (#1091).
Why
DynamoDB answers UPDATING to these four changes, and a DescribeTable sent right after reports UPDATING too (us-east-1, 13 and 14 Nov 2026). The table is ACTIVE again when the change applies, 2.23 s after a capacity change. A
DeletionProtectionEnabledchange alone answers ACTIVE. A switch to PROVISIONED answers UPDATING, and anOnDemandThroughputorWarmThroughputchange alone answers ACTIVE (17 Nov 2026). ExtendDB answered ACTIVE to all of them.DynamoDB refuses
ProvisionedThroughputwith the table's own units, with or withoutBillingMode, withValidationException"The provisioned throughput for the table will not change. ..." (us-east-1, 20 Nov 2026, #1199). So that request opens no update on the service.Closes #1043
Not in this PR
TableClasschange or a stream change, a capacity change gets the IOPS sentence above, where DynamoDB names the change in progress (While a table is UPDATING, DynamoDB refuses DeleteTable and other UpdateTable changes with their own texts, where ExtendDB serves them #1091).ProvisionedThroughputwith the table's own units and noBillingMode, where DynamoDB refuses it. WithBillingModePROVISIONED, ExtendDB's refusal lacks the last sentence of the service's text. MongoDB accepts both.BillingModePAY_PER_REQUEST on an on-demand table and toTableClassSTANDARD on a STANDARD table are not measured. ExtendDB answers ACTIVE and opens no window, as before this change.control_plane_delay_seconds, the UpdateTable response reports ACTIVE.Other open PRs
crates/storage-postgres/src/update_table.rs. fix: answer requests during a table's DELETING window as the service does #550, fix(cassandra): fence concurrent DeleteTable with a lease #598 and fix: answer TTL and tag calls during a table's DELETING window #599 also conflict there incrates/storage-sqlite/src/update_table.rs. This PR reads three more columns there, and the other PRs add a status check after the line. The resolution keeps the names of this PR and the check of the other PR.docs/differences-from-dynamodb.md. They write 0.25 in the Default column of thecontrol_plane_delay_secondsrow, and this PR changes the Description column of that row. The resolution keeps 0.25 and this PR's description.status_transition_at. Whichever merges after this PR does four things:enters_updatingwith the stored values.capacity_change_in_windowunder the lock or condition of that write.answer_status.reported_status.Testing done
The PR's commits up to the last reviews: the fix 07c8d38, the test commit 8ec2603, the merge of
main9fc1d6c, c1d9e13 and 07929ee. Since then: the merge 646258a, 5b6e23a, c1192d8 and c8cd082.At c8cd082
cargo +1.97.0 fmt --allwith--checkis clean. The two clippy commands of.github/workflows/clippy.yml, with-D warnings, are clean on core, engine, storage and the four backend crates.cargo +1.94.0 check --locked --all-targetsof the same seven crates is clean.cargo +1.97.0 test --locked --lib --no-fail-fastof the seven crates: core passed 1260 with 1 ignored, the engine 985 and storage 296. Cassandra passed 192, MongoDB 197 with 87 ignored, PostgreSQL 94, and SQLite 337 with 1 ignored. The other 2 SQLite tests,backup_catalog::write_lock_tests, fail on every branch on the machine that ran them (storage-sqlite: the two write_lock_tests fail when an ancestor of the Cargo target directory is owned by another user #1414). On that machine uid 65534 owns/local/home.cargo +1.97.0 test --locked -p extenddb-wasm-adapterpassed its 3 unit tests and the parity corpus. The clippy step of the WebAssembly workflow is clean. Thedoc_version_literalstest passed.cargo +1.97.0 test --locked -p extenddb-storage-postgres --tests --no-fail-fastpassed 501 with 2 ignored, in a debug build. The other 5 fail at the host check of storage-sqlite: the two write_lock_tests fail when an ancestor of the Cargo target directory is owned by another user #1414: threestore_identitytests oftests/backup_restore.rsand two tests oftests/catalog_nul_backup_jobs.rsopen a filesystem backup store under/local/home.cargo test -p extenddb-storage-mongodb snapshot_enginepassed 12, and the ignored lib testsdata_engine::live_tests::passed 22. The standalone test ran against a standalone mongod.cargo test -p extenddb-storage-cassandra --test direct_integration, filtered totable_engineandstream_disable, passed 6.update_window_conformancepassed in the SQLite lib run and in each of the three database runs above.tests/pythonran against a SQLite server and a PostgreSQL server of this head, with the settings ofdevtools/run-tests. On each backend they passed 96 tests, with 6 expected failures. The files aretest_update_table_status.py,test_stream_disable.py,test_stream_disable_fold.py,test_warm_throughput.pyandtest_warm_throughput_updates.py. The 6 are the four closed-shard rows of End GetRecords iterators after closed shard exhaustion #372 and the two rows oftest_stream_disable_fold.pythat change an index's throughput.pytest --collect-onlycollected 7334 tests intests/and 850 intests/python, with no error.Controls of 5b6e23a
Each control ran on a clean tree, and
git checkoutput the files back after it.update_window_conformancefails on SQLite, PostgreSQL, MongoDB and Cassandra, with 8 of 8 changes applied.enters_updatingtesting whether each member is present, as at07929ee08, the unit tablea_member_equal_to_the_stored_value_opens_no_windowfails, and the SQLite conformance run fails onProvisionedThroughput5/5: the response says UPDATING.646258a66e, the engine testone_of_the_capacity_changes_sent_together_appliesfails with 8 of 8 changes applied.At 07929ee
cargo +1.97.0 test --locked --libofextenddb-engine,extenddb-storageandextenddb-storage-sqlitein one run: the engine passed 893, storage passed 290, and SQLite passed 328 with 1 ignored. The other 2 SQLite tests,backup_catalog::write_lock_tests, fail on every branch on the machine that ran them (storage-sqlite: the two write_lock_tests fail when an ancestor of the Cargo target directory is owned by another user #1414). On that machine uid 65534 owns/local/home, and the backup store requires parent directories that root owns.extenddb-storage-cassandrapassed its 191 lib tests, which need no database.a_status_transition_at_that_does_not_parse_is_an_errorfails, and DescribeTable reports the table ACTIVE.devtools/run-tests,tests/python/test_update_table_status.pypassed its 30 tests.In CI the window lasts 0.05 s, because
devtools/run-testssetscontrol_plane_delay_secondsto 0.05. When a call returns after that time,test_a_capacity_change_inside_the_window_is_refusedand_assert_opened_statusaccept the answer of an ACTIVE table. So when the calls take longer than the window, these rows pass on main too. The checks inside a window are the engine tests inupdate_table_status_tests.rson SQLite, with delays of 1 s and 3600 s.update_window_conformancechecks inside a window of 3600 s on each backend.On 07c8d38
extenddb-corepassed 1146,extenddb-storage264 andextenddb-storage-mongodb190.extenddb-enginepassed 871 and failed 2 under load. The 2 arebackup::teststiming tests, and they passed when run alone.extenddb-storage-sqlitepassed 308 and failed 2, thebackup_catalog::write_lock_tests. These 2 fail the same way on main in the test environment, at a file owner check.tests/python/test_update_table_status.pyand eight other files intests/pythonpassed 138, with 4 expected failures. The 4 are the closed-shard rows of End GetRecords iterators after closed shard exhaustion #372. These files cover UpdateTable, streams and warm throughput. Six top-level UpdateTable files passed 55, with 1 skipped.On the revision before 07c8d38
This revision differs from 07c8d38 in three status checks and in test helpers.
extenddb-storage-postgrespassed 84 lib tests andextenddb-storage-cassandrapassed 157. The wire files above passed with the same counts on PostgreSQL and Cassandra. The cross-account stream test passed on each of the four backends.reported_statuscalls reverted, the engine's window test fails withleft: "ACTIVE",right: "UPDATING".control_plane_delay_secondsset to 5, requests sent inside the window got the answers of an ACTIVE table on all four backends. A second capacity change is the one exception, because the window refuses it. On each backend these requests were PutItem, Query, TransactWriteItems, UpdateTimeToLive, CreateBackup and DeleteTable. On SQLite they also covered the other data-plane, tag, backup and stream requests. At 07929ee, DeleteTable inside a window answered UPDATING on Cassandra. Since the merge of main in 646258a, it answers DELETING on every backend.status_transition_at.On 8ec2603
The snapshot tests wrote UPDATING into the catalog to stand for a table that is not ACTIVE. No backend stores UPDATING now. A MongoDB snapshot reads the reported status, so two MongoDB tests opened that table and failed in CI. In 8ec2603 the fixtures write CREATING, which every backend refuses. The MongoDB snapshot tests pass in CI.
Line counts at c8cd082 against
main: production +529 -155, tests +1101 -22, docs +30 -9. The lines after#[cfg(test)], the files undertests/, and the*_tests.rs,*live_tests*.rsand*_conformance.rsfiles count as tests. The commits since the last reviews account for production +409 -186, tests +494 -5 and docs +19 -5.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, 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
ProvisionedThroughput,BillingMode,TableClassorStreamSpecification, and DescribeTable reports UPDATING forcontrol_plane_delay_secondsafter it. The earlier release answered ACTIVE. A member equal to the stored value answers ACTIVE, as in the earlier release.ResourceInUseException, where the earlier release applied it. Of such changes sent at the same moment, one applies.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.