Repository navigation
fix: send LastIncreaseDateTime after an UpdateTable raises throughput - #1207
LeeroyHannigan wants to merge 24 commits into
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.
Amazon DynamoDB sets ProvisionedThroughput.LastIncreaseDateTime to the instant of an UpdateTable that raises either capacity unit of a PROVISIONED table. The UpdateTable response carries the instant, and so does every DescribeTable after it. A change that lowers both units leaves the member as it was. After a switch from PAY_PER_REQUEST to PROVISIONED, the service sends the member while the table is UPDATING and not once it is ACTIVE. The DeleteTable response carries none. The answers were measured in us-east-1 on 14, 16 and 19 Nov 2026. ExtendDB sent the member in no response on any backend. UpdateTable now writes the instant of a raise into the table's stored provisioned_throughput JSON, beside the two capacity members, so no catalog migration is needed. After a switch it also writes the end of the UPDATING window, and the description reports the instant until then. The DeleteTable response drops the member. Fixes #1035.
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.
TableThroughputRecord::for_update keeps the stored LastIncreaseDateTime when a request lowers both units. No test covered the rule: the tests that check LastIncreaseDateTime lower the units only of a table that was never raised. The new unit test lowers a record that holds an instant and compares the whole record. No recorded measurement raises a table and then lowers it. The doc comment of for_update now cites the DynamoDB API reference for the rule. It defines LastIncreaseDateTime as the date and time of the last provisioned throughput increase for the table.
The SQLite and PostgreSQL UpdateTable parsed the stored provisioned_throughput twice. The check of an unchanged throughput read it as a JSON value, with 0 for a member it could not read. The new record read it as a TableThroughputRecord, with no stored record when it did not parse. Both now use the record of one parse. A value that does not parse now fails the request with StorageError::Internal before any write, as DescribeTable fails on the same row. The refusal text of an unchanged throughput is the same.
The SQLite description read the clock once for LastIncreaseDateTime and again for TableStatus. A description built at the end of an UPDATING window could then report ACTIVE and still carry the instant of a switch to PROVISIONED. Both members now use one reading.
navareamol
left a comment
There was a problem hiding this comment.
I think this needs a rebase and one measurement before it merges.
-
The branch does not merge with main. #963 is merged now, and the head conflicts in
crates/storage-sqlite/src/update_table.rsandcrates/engine/src/update_table.rs. The engine conflict is between yourchanges_capacitycheck and main'scompanion.is_some()andswitches_to_on_demandterms. I resolved both by keeping both sides and the PR's own tests pass (the engine status tests,test_update_table_status.py35 of 35). After the merge,cargo test --lib -p extenddb-storage-sqlitedoes not compile:crates/storage-sqlite/src/table_helpers.rs:523callssqlx::query(&format!(...))and sqlx 0.9.1 refuses dynamic SQL (E0277). The helper comes from the #1093 branch, and your new SQLite test sits in the same module. Could you merge main once #1093 lands and wrap that SQL insqlx::AssertSqlSafe(...)? The description's "Other open PRs" list names #963 as open. -
The unit test
a_lowering_keeps_the_instant_of_the_last_raisechecks that a request that lowers both units keeps the old instant. The description says no measurement covers raise then lower, and takes the rule from the API reference wording. Have you measured it on the service? I think it needs raise, wait for ACTIVE, then lower both units, twice, before the test pins it. Also, no integration test lowers a table that was raised earlier. I changed the(false, _)arm offor_updateto(None, None): the unit test fails, but the engine tests and every row oftest_last_increase_date_time_follows_the_measured_answersstill pass. A row with raise followed by a lowering would close that gap. -
The checklist ticks
cargo test --workspace, while "Testing done" lists--libruns of three crates and two failing SQLite tests. Which one is right? -
Two answers the description lists as unmeasured are visible on a server. DescribeTable in a DELETING window returns the instant (I saw it with a 2 s delay and a DeleteTable after a raise), while the DeleteTable response does not. A table switched to PAY_PER_REQUEST after a raise reports its old units and the instant of the raise. Has the service been asked about either? If not, I think leaving the instant out of both answers is the safer default until it is.
I will approve once the branch merges with main and builds its tests, and the lowering rule is measured or removed.
One hunk of crates/engine/src/update_table.rs conflicted. Main added the companion.is_some() term of #963 to the condition that reads the table before the backend call. This branch replaced switches_to_on_demand with changes_capacity in the same condition. The merge keeps both terms. changes_capacity includes every switch to PAY_PER_REQUEST. Main moved to sqlx 0.9.1 in #1166, and sqlx 0.9.1 refuses a query string that the code builds at run time. The SQLite test helper table_with builds its UPDATE with format!, so the merge wraps that string in sqlx::AssertSqlSafe.
… values The engine read the table status before the backend wrote status_transition_at, so capacity changes sent at the same moment could all apply. Each backend now refuses a capacity change inside a window in the write that would open one. SQLite decides it under its write lock and PostgreSQL under the FOR UPDATE row lock. On Cassandra the LWT of the tables row is conditional on the status_transition_at that the request read. On MongoDB the update filter matches that value. Of such changes sent together, one applies. The others get ResourceInUseException with the IOPS text. A request now opens a window only when a member differs from the stored value. These requests answer ACTIVE and open no window, as before windows existed: - ProvisionedThroughput equal to the stored units - BillingMode PAY_PER_REQUEST on an on-demand table - TableClass STANDARD on a STANDARD table DynamoDB refuses the first of these (#1199). Its answer to the other two is not measured. The UpdateTable response reports UPDATING only when the request opened the window, so the engine no longer sets the status. The engine handler is main's again, apart from its doc comment. update_window_conformance sends eight changes at once on each backend and expects one to apply. The engine test sends eight on SQLite.
The two changes under Breaking changes had no entry under Behavior Changes by Release. The entry names both. UpdateTable and DescribeTable answer UPDATING for control_plane_delay_seconds after a ProvisionedThroughput, BillingMode, TableClass or StreamSpecification change. A second ProvisionedThroughput or BillingMode change in that time gets ResourceInUseException. The entry also says what a client must do, and that a rollback to v1.1.0 reads the same rows as ACTIVE.
The merged branch holds main at c057660 and the #1093 change that decides the UPDATING window in each backend write. Six files conflicted. - crates/engine/src/delete_table.rs: main's #1411 builds the answer with deleting_description, and this branch clears LastIncreaseDateTime after prepare_for_response. The merge clears the member on the description that deleting_description returns. - crates/storage-sqlite/src/table_helpers.rs: the status now goes through parse_transition_at of #1093, with the one clock read of this branch. Both new tests stay. - crates/storage-sqlite/src/update_table.rs and crates/storage-postgres/src/update_table.rs: the locked SELECT reads the columns of both sides. The NoOp check and the stored units of StoredCapacity come from the TableThroughputRecord that this branch parses. The window refusal comes first, then updating_until, which now opens only when enters_updating is true for the stored values. On SQLite, main's stream decision of #963 follows them. - crates/storage-cassandra/src/update_table.rs: the stored billing mode has one name, stored_bm, and updating_until follows the same rule. - crates/storage-mongodb/src/table_engine.rs: the imports of both sides, and updating_until follows the same rule. The engine test that #1093 adds calls provisioned_5, which this branch renamed. The merge calls provisioned(5, 5).
…aise No recorded measurement raises a table and then lowers it. The rule that a lowering keeps the instant of the last raise had no measurement behind it. for_update now leaves the member out after a request that lowers a unit and raises none. A request with the stored units keeps the record. The unit test checks both against a raised record. A new row of the engine test raises a table and then lowers it.
The DeleteTable answer cleared the member, but DescribeTable of a table that was still DELETING sent it. DynamoDB sends none in the DeleteTable answer after a raise (measured 2026-11-19), and its DescribeTable answer while DELETING is not measured. prepare_for_response now clears the member for every DELETING description, and the DeleteTable handler is main's again.
SQLite, Cassandra and MongoDB tested whether the stored end of the window lies ahead of now through reported_status and a TableStatus comparison. They now compare the two instants. The in_window helper of the Cassandra backend goes. The doc comment of StorageError::IndexesInUse names the IOPS refusal that it now carries. write_tables_row takes eight arguments since the window condition, so it carries the too_many_arguments allow of its caller apply_table_update.
The merge takes c8cd082 of #1093, which compares the stored end of the UPDATING window with the clock directly on SQLite, Cassandra and MongoDB. The import lists of the SQLite and Cassandra update paths conflicted. The merge keeps the lists of this branch without reported_status, which the update paths no longer call.
|
Main is at db8a90d. This branch last had main at c057660. Since then, #1531 merged into main. One file conflicted: docs/manuals/07-upgrade-manual.md. #1531 added 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 #1531 comes next, above the other v1.2.0 entries of main. The other six files of #1531 are not files of this branch.
…-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.
|
@LeeroyHannigan all four points are resolved or answered at fe71db9.
One thing from my side: my own concurrency test, which assumed that the winner of 8 concurrent raises always stamps, fails at this head on both backends. A request that lowers relative to what another request stored first now gets no instant, so that is the new rule and not a defect. On Cassandra and MongoDB, the The service statements (the raise table, #1197, #1198) are your measurements. I approve once #1093 has merged and this branch is retargeted. |
The Control Plane table of docs/differences-from-dynamodb.md had no row for ProvisionedThroughput.LastIncreaseDateTime. The new row gives the answers of the service, measured from 2026-11-14 to 2026-11-20, beside the answers of ExtendDB. Two cases differ. ExtendDB keeps the instant of the request once the table is ACTIVE, where the service reports a later instant (#1206). On MongoDB a switch to PAY_PER_REQUEST loses the instant of an earlier raise (#1198). Two answers of ExtendDB are not measured on the service. One is none after a change that lowers a unit and raises none. The other is none in the description of a DELETING table.
|
@navareamol The doc needs a row. Before this PR, ExtendDB sent no
Two of ExtendDB's answers are not measured on the service. One is none after a raise and then a lowering, and the other is none in DescribeTable while DELETING after a raise. 421aa19 adds the row to the Control Plane table of |
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.
…-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.
Changes since the last review
#1093 merged into
mainon 4 December 2026 as the squash commit1e2ebdd833, and this PR now targetsmain. navareamol's comment of 3 December readfe71db992eand finds the four points of the review of00a127ca3resolved or answered. Sincefe71db992e:a20ac02714mergesf583547773, the last head of fix: answer UPDATING while an UpdateTable change applies #1093, which mergesmainat1174651fc8. Git merged it without a conflict.db3ec9809fthen mergesmainat1e2ebdd833. The squash commit is not in the history of this branch, so git compares both sides from1174651fc8, which has none of the lines of fix: answer UPDATING while an UpdateTable change applies #1093. Nine files conflicted, in 37 hunks, where this PR changes lines that fix: answer UPDATING while an UpdateTable change applies #1093 added. In each hunk, the side ofmainholds the lines of fix: answer UPDATING while an UpdateTable change applies #1093 asf583547773has them. The merge keeps the side of this PR. The diff of this PR againstmainhas the same changed lines as the diff of421aa193f3against fix: answer UPDATING while an UpdateTable change applies #1093'sb8f73c43c6. The gates ondb3ec9809f, with the details in Testing done:cargo +1.97.0 fmt --all -- --checkand the two clippy commands of.github/workflows/clippy.ymlare clean.table_snapshotandupdate_table_windowpass. So do the Cassandra testsstream_disableandtable_engineofdirect_integration, and the MongoDB live test ofupdate_window.test_update_table_status.py,test_stream_disable.pyandtest_warm_throughput_updates.pyoftests/pythonpass on a SQLite server and on a PostgreSQL server, with the 4 expected failures of End GetRecords iterators after closed shard exhaustion #372.5d2ca5bac0merges fix: answer UPDATING while an UpdateTable change applies #1093's branch atb8f73c43c6, which mergesmainatdb8a90dad9and so adds fix(storage-cassandra): retry a lost UpdateItem version check over the PutItem and DeleteItem window #1531. Git merged it without a conflict, because the commits of this PR change none of the files of fix(storage-cassandra): retry a lost UpdateItem version check over the PutItem and DeleteItem window #1531. The diff of this PR against fix: answer UPDATING while an UpdateTable change applies #1093's branch is the same as atfe71db992e.421aa193f3adds aProvisionedThroughput.LastIncreaseDateTimerow to the Control Plane table ofdocs/differences-from-dynamodb.md, as navareamol asked. It gives the measured answers of the service beside ExtendDB's. It names the two cases that differ (LastIncreaseDateTime once the table is ACTIVE again: DynamoDB reports a later instant than the UpdateTable response, where the fix for #1035 keeps the request instant #1206, and A table switched to PAY_PER_REQUEST reports its old provisioned units on SQLite, PostgreSQL and Cassandra, where DynamoDB reports 0 and 0 #1198 on MongoDB) and the two answers of ExtendDB that are not measured.db3ec9809f, and Testing done names each command that ran at that head. The checklist leaves "All tests pass" and "Code is formatted" unticked until CI is green.The commits from
00a127ca3tofe71db992e:371a3ec745merges fix: answer UPDATING while an UpdateTable change applies #1093's branch, which now mergesmainatc057660361. Six files conflicted:crates/engine/src/delete_table.rs: main's fix(engine): describe a DELETING table with the members the service keeps #1411 builds the answer withdeleting_description, and this branch clearedLastIncreaseDateTimeafterprepare_for_response. The merge cleared the member on the description thatdeleting_descriptionreturns.crates/storage-sqlite/src/table_helpers.rs: the status goes through fix: answer UPDATING while an UpdateTable change applies #1093'sparse_transition_at, with the one clock read of this branch. Both new tests stay.crates/storage-sqlite/src/update_table.rsandcrates/storage-postgres/src/update_table.rs: the locked SELECT reads the columns of both sides. The unchanged-throughput check and the stored units of fix: answer UPDATING while an UpdateTable change applies #1093's window check come from theTableThroughputRecordthat this branch parses. The window refusal comes first, thenupdating_until, which this branch computes only when the request opens a window.crates/storage-cassandra/src/update_table.rs: the stored billing mode has one name, andupdating_untilfollows the same rule.crates/storage-mongodb/src/table_engine.rs: the imports of both sides, andupdating_untilfollows the same rule.5f2fdb1990removes the rule that a lowering keeps the instant of the last raise. No recorded measurement raises a table and then lowers it. After a request that lowers a unit and raises none, ExtendDB sends noLastIncreaseDateTime. A request with the stored units keeps it. A new row of the engine test raises a table and then lowers it.f0516b8106:prepare_for_responseleavesLastIncreaseDateTimeout of every DELETING description, so DescribeTable while DELETING answers as DeleteTable does.crates/engine/src/delete_table.rsis main's again.fe71db992emerges fix: answer UPDATING while an UpdateTable change applies #1093's last commit, which compares the stored end of the window with the clock directly.What
An UpdateTable that raises
ReadCapacityUnitsorWriteCapacityUnitsof a PROVISIONED table now setsProvisionedThroughput.LastIncreaseDateTimeto the instant of the request, in whole milliseconds. The UpdateTable response and every later DescribeTable report it, until a later raise replaces it. After a change that lowers a unit and raises none, the descriptions carry noLastIncreaseDateTime. A change with the table's own units keeps it. After a switch from PAY_PER_REQUEST to PROVISIONED, the description reports the instant only while the table is UPDATING. The description of a DELETING table carries none, in the DeleteTable response and in DescribeTable. Before this change, ExtendDB sent the member in no response on any backend.This PR builds on #1093, which holds a table UPDATING for
control_plane_delay_secondsafter an UpdateTable. #1093 merged intomainon 4 December 2026, and this PR now targetsmain.TableThroughputRecordincrates/storage/src/util/throughput.rsdecides the instant. Each backend stores it in the table'sprovisioned_throughputJSON beside the two units, so the change needs no catalog migration. After a switch, the record also stores the end of the UPDATING window. Each backend computes that end once and writes it to #1093'sstatus_transition_attoo. PostgreSQL readsNOW()in its first locked SELECT for this, so both values come from the database clock.The description compares the stored end with the application clock. On PostgreSQL, the ExtendDB host's clock can differ from the database host's. A switch's instant can then leave the description earlier or later than UPDATING ends, by that difference.
On SQLite and PostgreSQL, an UpdateTable whose stored
provisioned_throughputdoes not parse fails with an internal error before any write, as DescribeTable fails on that row.Why
DynamoDB's answers, measured in us-east-1 on 14, 16, 19 and 20 November 2026, each sequence twice on new tables keyed on
pk(S):LastIncreaseDateTimeat the request instant, in epoch seconds with 3 decimalsLastIncreaseDateTime, an instant 0.8 s to 2.8 s laterLastIncreaseDateTimeLastIncreaseDateTimewhile UPDATING, none once ACTIVELastIncreaseDateTimeExtendDB reports the request instant while UPDATING and once ACTIVE (#1206).
No recorded measurement raises a table and then lowers it. #1197 lowers only tables that were never raised, and its 9/6 change raises the read units. #1198 raises a table and then switches it to PAY_PER_REQUEST. The service keeps the instant of the raise, but that request changes the billing mode and leaves the units alone. So after a lowering, ExtendDB sends no member. The service's DescribeTable answer while DELETING is not measured either, so it gets the DeleteTable answer.
Fixes #1035
Not in this PR
Each of these is in an open issue:
LastDecreaseDateTimeand keepsNumberOfDecreasesTodayat 0.BillingMode, where DynamoDB refuses it.BillingModeSummaryand noNumberOfDecreasesToday.No issue tracks these:
provisioned_throughputthat does not parse as no stored record. Cassandra also still reads that value twice.Other open PRs
main, and the merges above resolve their conflicts with this PR.git merge-treeofdb3ec9809fand ofmainat1e2ebdd833with each of the other 212 open PRs found the same conflicted files for both. 87 of those PRs conflict withmain.last_increase_date_time: None. Whichever merges after this PR can write the record withTableThroughputRecord::for_updateand build the description withtable_throughput_description.Testing done
At db3ec98
cargo +1.97.0 fmt --allwith--checkis clean. The two clippy commands of.github/workflows/clippy.yml, with-D warnings, are clean on the whole workspace.cargo +1.94.0 check --locked --all-targetsof core, engine, storage and the four backend crates is clean.cargo +1.97.0 test --locked --lib --no-fail-fastof the seven crates: core passed 1260 with 1 ignored, the engine 986 and storage 299. Cassandra passed 194, MongoDB 197 with 87 ignored, PostgreSQL 94, and SQLite 339 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 --release -p extenddb-storage-postgres --no-fail-fast --test table_snapshot --test update_table_windowran withEXTENDDB_TEST_PG_REQUIREDandEXTENDDB_EXPECT_VECTORS, as CI sets them.table_snapshotpassed 94 with 2 ignored, the two race measurements that run by hand.update_table_windowpassed 1.PasswordAuthenticator,--test direct_integrationwith thetest-hooksfeature, filtered tostream_disableandtable_engine, passed 6.overlapping_stream_changes_apply_exactly_one(Flaky on Cassandra: overlapping_stream_changes_apply_exactly_one saw both concurrent stream changes apply #1192) passed in the first run.data_engine::live_tests::update_window::live_update_table_opens_one_window_for_changes_sent_togetherpassed.a_raise_stamps_last_increase_date_time_as_measured, the unit testa_lowering_after_a_raise_leaves_the_instant_outand the core testa_deleting_description_omits_the_members_the_service_dropspassed in the lib run. fix: answer UPDATING while an UpdateTable change applies #1093'supdate_window_conformancepassed on all four backends: in the SQLite lib run and in the PostgreSQL, Cassandra and MongoDB runs above.test_update_table_status.py,test_stream_disable.pyandtest_warm_throughput_updates.pyoftests/pythonran against a SQLite server and a PostgreSQL server of this head. The servers had the settings ofdevtools/run-tests, and the test processes ran withoutREQUESTS_CA_BUNDLEandCURL_CA_BUNDLE, as in CI. On each backend the files passed 66 tests, with 4 expected failures: the four closed-shard rows of End GetRecords iterators after closed shard exhaustion #372 intest_stream_disable.py.pytest --collect-onlycollected 7408 tests intests/and 863 intests/python, with no error.At 5d2ca5b
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 986 and storage 298. Cassandra passed 194, MongoDB 197 with 87 ignored, PostgreSQL 94, and SQLite 338 with 1 ignored. Two of the Cassandra tests come from fix(storage-cassandra): retry a lost UpdateItem version check over the PutItem and DeleteItem window #1531. 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.PasswordAuthenticator,--test direct_integrationwith thetest-hooksfeature ran the modules of UpdateTable, DescribeTable and the item writes that fix(storage-cassandra): retry a lost UpdateItem version check over the PutItem and DeleteItem window #1531 changes:table_engine,stream_disable,update_item_retry,delete_item,put_get_itemandsnapshot_engine. It passed all 37 tests, fix: answer UPDATING while an UpdateTable change applies #1093'supdate_window_conformanceand the threeupdate_item_retrytests of fix(storage-cassandra): retry a lost UpdateItem version check over the PutItem and DeleteItem window #1531 among them.crates/storage-cassandraanddocs, so those crates have the sources of fe71db9. At fe71db9, CI passed all 72 check runs,run-postgres-storage-tests,mongodb-snapshotandmongodb-rustamong them. The section below gives the local runs there.a_raise_stamps_last_increase_date_time_as_measured, the unit testa_lowering_after_a_raise_leaves_the_instant_outand the core testa_deleting_description_omits_the_members_the_service_dropspassed in the lib run. So did fix: answer UPDATING while an UpdateTable change applies #1093'supdate_window_conformanceon SQLite.test_update_table_status.py,test_stream_disable.py,test_stream_disable_fold.py,test_warm_throughput.pyandtest_warm_throughput_updates.pyoftests/pythonran against a SQLite server and a PostgreSQL server of this head. The servers had the settings ofdevtools/run-tests. On each backend the files passed 101 tests, with 6 expected failures, as at fe71db9.pytest --collect-onlycollected 7339 tests intests/and 855 intests/python, with no error.At fe71db9
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 986 and storage 298. Cassandra passed 192, MongoDB 197 with 87 ignored, PostgreSQL 94, and SQLite 338 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.a_raise_stamps_last_increase_date_time_as_measured, with its new row, and the unit testa_lowering_after_a_raise_leaves_the_instant_outpassed in the lib run. fix: answer UPDATING while an UpdateTable change applies #1093'supdate_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 101 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 7339 tests intests/and 855 intests/python, with no error.Controls
Each control ran on a clean tree, and
git checkoutput the files back after it.(false, _) => (before.last_increase_date_time, before.reported_until)of00a127ca3put back infor_update, the unit testa_lowering_after_a_raise_leaves_the_instant_outfails. The new engine row fails too, because the answer after the lowering carries the instant of the raise.prepare_for_response, the core testa_deleting_description_omits_the_members_the_service_dropsfails, and the engine test fails at the DeleteTable answer after a raise.At 00a127c
cargo +1.97.0 test --locked --libofextenddb-engine,extenddb-storageandextenddb-storage-sqlitein one run: the engine passed 894, storage passed 292, and SQLite passed 329 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).extenddb-storage-postgrespassed 87 lib tests andextenddb-storage-cassandrapassed 191, which need no database.crates/storage-sqlite/src/update_table.rsof 927ef11, the new testa_provisioned_throughput_that_does_not_parse_refuses_an_updatefails, because the UpdateTable succeeds.At 2554728
tests/python/test_update_table_status.py,tests/python/test_control_plane.py,tests/python/test_tables.py,tests/python/test_stream_disable_fold.py,tests/python/test_warm_throughput.pyandtests/python/test_warm_throughput_updates.pypassed 109 tests on each of SQLite, PostgreSQL, MongoDB and Cassandra.control_plane_delay_secondson each backend, the raise and switch sequences above sentLastIncreaseDateTimewhere DynamoDB sends it, apart from the instant once ACTIVE. Every instant had at most 3 decimals.Line counts at db3ec98 against
mainat1e2ebdd833, with the lines after#[cfg(test)]and the test files counted as tests: production +321 -175, tests +289 -23. The docs add 1 line, the row of421aa193f3. The production and test counts are the same as at 5d2ca5b against #1093's headb8f73c43c6, and at fe71db9 againstc8cd0820ec. The two commits after00a127ca3that are not merges, 5f2fdb1 and f0516b8, account for production +16 -10 and tests +37 -17.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
None. After a raise, the UpdateTable and DescribeTable responses carry
ProvisionedThroughput.LastIncreaseDateTime, a member that the earlier release never sent. The storedprovisioned_throughputJSON gains two members, and an earlier binary ignores them.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.