Repository navigation
feat: per-index throttle buckets for provisioned global secondary indexes - #587
LeeroyHannigan wants to merge 15 commits into
Conversation
… into their own files Pure moves with no behaviour change, so that the per-index throttle change after this commit keeps every file it grows under 600 lines. crates/core/src/throttle.rs goes from 669 to 468 lines. TokenBucket, BURST_SECONDS and the four bucket tests move to throttle/bucket.rs; the struct and the four methods the manager calls become pub(super). The seven manager tests move to throttle/manager_tests.rs, one indent level shallower. crates/server/src/handler.rs goes from 581 to 522 lines. The throttle segment of serve_request (lazy registration, the capacity check, the two throttle metrics and the refusal) moves to handler/throttle_segment.rs as check(state, ctx, operation, table_name, partition_value). serve_request extracts the partition value where it did before and passes it in, and the segment returns the same Refused. The moved text changes only where a parameter changed type: tn is a &str, so the DescribeTable input takes tn.to_owned(), and partition_value is already an Option<&str>.
…secondary indexes
A provisioned global secondary index has its own read and write capacity.
The service refuses a Query or Scan that names the index when the index's
read capacity is exhausted, with the table message and
IndexReadProvisionedThroughputExceeded naming the index ARN, and refuses a
base-table write held back by an index's write capacity with its own
message and IndexWriteProvisionedThroughputExceeded (measured against
Amazon DynamoDB on 2026-10-24 and 2026-10-25: 648 index reads, 104
BatchWriteItem and 5,876 PutItem, UpdateItem and single-item
TransactWriteItems).
ThrottleManager keeps a bucket pair per registered index, keyed by the
table and ordered as DescribeTable lists them. register_indexes replaces
the set: a kept index keeps its balance and takes the new rate, a new one
starts with one second of its rate, a dropped one loses its buckets;
remove_table drops them. A read naming a registered index is checked
against and charged to the index's read bucket in place of the table's,
and still against the partition and account buckets; a write is checked
against the table's write bucket and then each index's in order, and
charged to the table and every index. The index bucket logic lives in
throttle/index.rs; the manager holds the locks and the table lookup.
ThrottleCause gains Index { index_name } and is Clone rather than Copy;
ThrottleResult::cause returns a borrow. The enum is public and not
non_exhaustive: an exhaustive match on ThrottleCause outside this
workspace stops compiling until it adds the Index arm, and code that
copies a cause, or keeps the value cause() returned, has to clone it.
The server registers the indexes with the table from the CreateTable,
UpdateTable and DescribeTable responses and on the lazy registration
path, passes the IndexName of a Query or Scan through the check and the
consume call, and sends the index ARN as the resource. On an index
refusal the Read/WriteThrottleEvents record carries the index as its
index dimension and ThrottledRequests carries the table and operation
only, as the service publishes those metrics. An index described with
0/0 throughput (the placeholder for an index created on a provisioned
table without throughput) gets no buckets.
The first commit sorts the body after authentication. Open pull requests #587, #549 and #547 edit the lines around the end of the authentication segment, so there the call conflicts with all three. This commit moves it to immediately after the parse, where it merges cleanly with the nine open pull requests that edit handler.rs. On a preserve_order build an unauthenticated request now pays for the sort, as it already pays for the parse. Without preserve_order the call does nothing. The comment now says which builds have preserve_order: any build that compiles the MongoDB backend crate, which includes a build of the whole workspace, not only the MongoDB binary.
crates/server/src/handler.rs keeps the move of the throttle segment into throttle_segment::check and the IndexName read from this branch. It keeps record_partial_batch_throttle from feat/console-tabs, and passes the metric table that feat/console-tabs computes to the moved segment. docs/differences-from-dynamodb.md keeps the partial batch success row from feat/console-tabs and the per-index throttle row of this branch.
…etric table feat/console-tabs brings three changes from main that the moved throttle segment and its tests did not build against. MetricsCollector::record takes the account since #955. Since #922 the throttle metrics use the metric table name. That name reduces an ARN to its table name and leaves out a name that fails the table name rules. GsiDescription has the warm_throughput and warm_throughput_record fields. throttle_segment::check now takes the metric table and records ReadThrottleEvents, WriteThrottleEvents and ThrottledRequests under the account and that table, as the segment did before the move. The index dimension of the throttle events stays as this branch made it. The index read wire test expects the account dimension that every record carries now. The GsiDescription of the helper tests sets both warm throughput fields to None.
The server design doc said that the server records ThrottledRequests per table and operation only. Since #955, every metric also carries the account. The sentence now says that ThrottledRequests carries no index dimension, as the service publishes it per table and operation.
demohan
left a comment
There was a problem hiding this comment.
The index read and index write bodies match the service: class, message, ThrottlingReasons and the index ARN, apart from the account and member order. Once a GSI's writes are exhausted, the service and this head refuse every single-item write to the table, including a delete of a missing key and a put whose condition would fail, and keep serving base-table reads and reads on other indexes. Measured on tables at 10/10 with each GSI at 1/1, three rounds each.
UpdateTable that adds or deletes an index registers or drops its buckets on all four backends, a restart registers them on the first request, and switching to PAY_PER_REQUEST drops them. No two of the four map locks are held at once, and 8 writers beside 20 concurrent UpdateTable calls gave no errors. Memory is about 134 bytes per index and 312 per table with indexes, and nothing grows over 1,000 re-registrations. Every negative control in the PR body fails as claimed. CI is green on 60 of 60 checks.
This branch is built on #532 and #557. I will approve once those land and the items below are done. The table name gate fix from #532 also needs to be applied at throttle_segment.rs:113, where this branch moved that block.
crates/engine/src/gsi_updates.rs:120
The refusal tells the client to raise the index with UpdateTable, and an UpdateTable GSI Update answers UpdateGlobalSecondaryIndex is not yet supported on all four backends. A GSI created at 1 WCU on a 1,000 WCU table refused 28 of 30 writes here; main served them all. The only ways out are deleting the index or switching billing modes. On the service, raising an exhausted index ends the refusals 1.9 and 3.4 s later, and 60 writes in a row are then served. The UpdateTable response still shows the old 1/1 there, so the new rate has to come from the request. The design doc and throttle.rs:280 say a kept index takes the new rate.
| /// bucket of the index `index_name` names when it is in `set`, `write_units` | ||
| /// to every index's write bucket. Returns whether a read was charged to an | ||
| /// index, in which case the table's read bucket is not charged. | ||
| pub(super) fn charge( |
There was a problem hiding this comment.
Every write is charged to every index. Writing items that do not carry the GSI key, the service accepted 48 writes and then refused with the table body, and this head accepted 1 and then refused with the index body, three rounds each. Charging an index only for writes that carry its key matches the service. The differences page records the current behaviour, but the answers differ.
There was a problem hiding this comment.
Fixed in 92cfc50. The Developer Guide states the rule (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html#GSI.ThroughputConsiderations.Writes). It reads: "If a write to a table does not require a global secondary index update, no write capacity is consumed from the index." PutItem, UpdateItem and DeleteItem now report the write units of each global secondary index that the old or the new item projects into. They count them as ConsumedCapacity counts the index arms, and the server charges those indexes only. The check did not change: the server refuses a write while any index's bucket is empty. The test is a_write_is_charged_to_an_index_only_when_its_item_carries_the_index_key, on a table at 3 WCU with the index at 1 WCU. Without the index key, the server serves two 2 KB items and refuses the third with the table reason. With the key, it refuses the second write with the index reason. The differences page row says the same.
| // Read/WriteThrottleEvents per table and per global secondary | ||
| // index; ThrottledRequests is published per table and operation | ||
| // only, so a count by table sees an index refusal too. | ||
| let refused_index = cause.index_name().map(str::to_owned); |
There was a problem hiding this comment.
When an index refuses a write, the service publishes WriteThrottleEvents for the table and for the index (138 and 162 in one minute, 40 and 40 in another). This head records only the index series. For index read refusals, the service publishes only the index series, which this head matches.
There was a problem hiding this comment.
Fixed in 92cfc50. When an index refuses a write, the segment now calls MetricsCollector::record a second time for WriteThrottleEvents, without the index dimension. An index read refusal still records the index series only. The CloudWatch metrics page (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html, WriteThrottleEvents) counts each event of a request on its own: "the table write, and each of the three index writes. For each event, the WriteThrottleEvents metric is incremented by one if that event is throttled". It also says that the TableName dimension returns the table's events and not the indexes'. It does not say that an index refusal counts for the table, so the rule comes from your two minutes of measurement. index_write_throttle_names_the_index_message_and_arn now asserts the nine records of its three refusals.
| // account is reduced to the bare name first, and a name the | ||
| // engine would refuse gets no resource at all. | ||
| let name = crate::authz_resource::key_lookup_name(tn, &state.region, &ctx.account_id); | ||
| let resource_arn = extenddb_core::validation::validate_table_name_chars(&name) |
There was a problem hiding this comment.
When the table's read capacity runs out, the service refuses a Query, a consistent Query or a Scan on an LSI with IndexReadProvisionedThroughputExceeded and the LSI's ARN (12 of 12). This head answers TableReadProvisionedThroughputExceeded with the table ARN (5 of 5), and index_throttle_wire_tests.rs:257 expects that body. Main answers the same, and the new index path is where the LSI ARN would go.
There was a problem hiding this comment.
No change in this round: settling it needs a live table, and I did not create one. At 854a414, lsi_read_throttle_is_the_table_body gets TableReadProvisionedThroughputExceeded with the table ARN for a Query naming the LSI on a drained 1 RCU table. Main (a417b2f, read from the code) sends the same class and message with no reasons list. These requests settle it: create a PROVISIONED table at 1/100 with an LSI, and drain its read capacity with base table Scans. Then send a Query, a consistent Query and a Scan naming the LSI, each twice, and read that minute's ReadThrottleEvents by table and by index. Your 12 of 12 named the LSI. If the live run answers the same, register_indexes would also take the table's LSI names, with no buckets of their own. A refusal by the table's read bucket on a read naming one would then carry the LSI ARN. That is about 25 production lines and one changed test row. If the service sends the table reason, nothing changes.
| /// carrying this text with the reason | ||
| /// `IndexWriteProvisionedThroughputExceeded` and the index ARN. No trailing | ||
| /// period. An index read past its read capacity carries the table message. | ||
| pub const INDEX_WRITE_PROVISIONED_THROUGHPUT_EXCEEDED_MESSAGE: &str = "The level of configured provisioned throughput for one or more global secondary indexes of the table was exceeded. Consider increasing your provisioning level for the under-provisioned global secondary indexes with the UpdateTable API"; |
There was a problem hiding this comment.
Optional. No test pins the text of the index write message. Changing "indexes" to "index" leaves every throttle test passing.
There was a problem hiding this comment.
Fixed in bdacbd7. The index write message is now the fourth row of throttle_error_documents_match_the_service in crates/core/src/error/throttle_tests.rs, the table that writes out the measured texts. With "indexes" changed to "index" in the constant, that test fails.
| // depend on timing. | ||
| state | ||
| .throttle | ||
| .consume_with_partition(&account_id, table, 2.0, 0.0, None, Some(GSI)); |
There was a problem hiding this comment.
Optional. Each drain of 2.0 against a rate-1 bucket leaves it at -1 token, so one second of scheduler delay turns a refusal into a 200. The comments at lines 138 and 166 say the test does not depend on timing and that the request count carries the table and operation only; it also carries AccountId.
There was a problem hiding this comment.
Fixed in 92cfc50. The index wire tests drain a bucket by DRAIN, 1,000 units. That is a debt of 999 seconds on a 1-unit bucket. A read drain also charges the account, and 1,000 is less than one second of its 80,000 units. The read test's comment no longer says the test does not depend on timing, and it names the account dimension of the request count.
A served write was charged to the write bucket of every provisioned global secondary index of the table. The service charges an index only when the write adds, changes or removes the item's entry in that index. The Amazon DynamoDB Developer Guide (GSI.html#GSI.ThroughputConsiderations.Writes) states the rule. It reads: "If a write to a table does not require a global secondary index update, no write capacity is consumed from the index." For example, a table had 3 WCU and its index had 1 WCU. A 2 KB item without the index key drained the index on the first write. The second write was then refused with the index body. PutItem, UpdateItem and DeleteItem now report the write units of each global secondary index that the old or the new item projects into. The count is DispatchMetrics::index_write_units, from capacity_helpers::index_write_units, which ConsumedCapacity uses too. On a table with a global secondary index, these operations read the old item for it. The server charges those units with the new ThrottleManager::consume_index_writes, and consume_with_partition no longer charges an index for a write. The check is unchanged: a write is still refused while any index's write bucket is empty, as on the service. An index write refusal now also records WriteThrottleEvents for the table, beside the record with the index dimension. The service publishes both series for such a refusal. An index read refusal still records the index series only. The index wire tests drain a bucket by 1,000 units in place of 2. On a 1-unit bucket that is a debt of 999 seconds, where 2 units left one second of debt. The comment on the read refusal's request count names the account dimension too.
The table of measured throttle documents wrote out three messages. The index write message is now the fourth row, so a change to its constant fails the test.
…Table A write refused by an index names UpdateTable as the way to raise the index. An UpdateTable with a GlobalSecondaryIndexUpdates Update that carried ProvisionedThroughput answered "UpdateGlobalSecondaryIndex is not yet supported" on every backend. So a client could end the refusals only by deleting the index or by changing the billing mode. On a table that is PROVISIONED before and after the request, such an Update (with no OnDemandThroughput) is now applied. SQLite, PostgreSQL, MongoDB and Cassandra each store the units in the index's throughput field, in the shape that the backend's create path writes. Each answers IndexNotFound for an Update that names no global secondary index of the table. The UpdateTable response and DescribeTable then show the new units. The server's index buckets take the new rate from that response, as they do for an index that the update creates or deletes. An Update carrying OnDemandThroughput on a provisioned table is still refused as not yet supported. So is the index update of a switch to PROVISIONED. The units are checked before the table is read. The answers are those of Amazon DynamoDB on 2026-11-25, on a table name that does not exist. A missing or null unit and a unit below 1 each give a clause at globalSecondaryIndexUpdates.<n>.member.update.provisionedThroughput.<unit>, write units first. UpdateGsiAction::provisioned_throughput_units reads the units for the backends. The service applies the new rate a few seconds after the request, and its response still shows the old units. Here the response shows the new units, and the rate applies with it. The differences page says so. The new wire test of the index charge no longer binds the unused account.
An UpdateTable whose GlobalSecondaryIndexUpdates carried an Update with ProvisionedThroughput for an index the table does not have reached the backend. Each backend answered IndexNotFound. On MongoDB the table's own members of the same request were written before that answer, so the request failed and the table still changed. The engine now looks up each such Update in the table it has read, before any backend write. The lookup is the one the WarmThroughput path uses. It moves into warm_throughput::gsi_named and keeps the same ResourceNotFoundException text. The backends keep their own checks for an index removed after the check in the engine. A Cassandra UPDATE writes a row even when none exists, so that backend still reads the index before its batch. An engine test checks the text. A Python case sends a new table throughput beside an Update of a missing index, and expects the table unchanged. On MongoDB it fails without the check in the engine.
SQLite wrote the ProvisionedThroughputDescription literal of an index in two places in update_table.rs. Both now call gsi_throughput_json. It sits beside parse_gsi_throughput in table_helpers.rs and writes the shape that parse_gsi_throughput reads. MongoDB read the table document in two blocks of update_table. One block clears the index throughput on a switch to PAY_PER_REQUEST. The other stores the units of an index Update. One read now serves both blocks.
charge_read is now one expression. The two index throttle wire tests built their metric dimensions with two pairs of closures, and one module-level dims function now serves both. Each Python row of the unit check on an index Update lists one tuple per clause. Before, it was a flat list. A manager test comment now says that the test itself charges each index two units.
|
The table name gate is in 854a414 applies an |
What
A provisioned global secondary index has its own read and write capacity on the service. The server's token buckets were per table, per partition key and per account. So the server never refused an index past its capacity, and a refusal never named an index. This change gives each provisioned global secondary index a read bucket and a write bucket in
ThrottleManager. It also sends the two bodies the service sends.ThrottleManager::register_indexesreplaces a table's index set from its description. A kept index keeps its balance and takes the new rate. A new index starts with one second of its rate, as a new table does. A dropped index loses its buckets, andremove_tabledrops them with the table. The set keepsDescribeTableorder.The manager checks a
QueryorScanthat names a registered index against the index's read bucket, in place of the table's, and charges that bucket. It still checks the read against the partition and account buckets, and charges them. For a write, it checks the table's write bucket and then each index's write bucket in order. The first bucket that is empty refuses it.The manager charges a served write to the table and to each index whose key attributes its old or new item carries.
PutItem,UpdateItemandDeleteItemreport those index write units (DispatchMetrics::index_write_units), counted asConsumedCapacitycounts the index arms. The service charges an index the same way.A local secondary index, or a name no registered index has, reads from the table's buckets as before. An on-demand table's indexes get no buckets. An index described with
0in both directions gets none either. That description is the placeholder a backend describes for an index created on a provisioned table without throughput.The server registers the indexes with the table from the
CreateTable,UpdateTableandDescribeTableresponses, and on the first request after a restart. It readsIndexNamefrom aQueryorScan. On an index refusal it sendsProvisionedThroughputExceededExceptionwith the index ARN as the resource. The body for a read carriesIndexReadProvisionedThroughputExceededwith the table message. The body for a write carriesIndexWriteProvisionedThroughputExceededwith the index message, which has no trailing period.ReadThrottleEventsandWriteThrottleEventscarry the refusing index as their index dimension. An index write refusal also recordsWriteThrottleEventsfor the table, andThrottledRequestscarries no index, as the service publishes those metrics. Each record also carries the account, as every metric of the server does. Its table dimension is the metric table name, which reduces a table ARN to the name.BatchWriteItemandTransactWriteItemscarry no top-levelTableName, and the server's throttle segment does not check them, as before.An
UpdateTablewhoseGlobalSecondaryIndexUpdatesUpdatecarriesProvisionedThroughputchanges the index's throughput. The table must be PROVISIONED before and after the request. The index write message names this request as the action to take. Each backend writes the units to the index's stored throughput, and the response andDescribeTableshow them. The index buckets take the new rate from the response.The engine checks the units before it reads the table, with the clauses measured against Amazon DynamoDB on 2026-11-25. After the read, it answers an
Updatethat names no index of the table withResourceNotFoundException, before any backend write. The service applies the new rate a few seconds after the request. Here it applies with the response.ThrottleCausegainsIndex { index_name }and isClonerather thanCopy.ThrottleResult::causereturns a borrow. The enum is public and stays exhaustive, since the server matches every cause to pick the wire body. A match on it outside this workspace gains an arm, and a copy becomes a clone.The first commit is a pure move, so the files the feature grows stay under 600 lines. It moves
TokenBucketand its tests tothrottle/bucket.rs, the manager tests tothrottle/manager_tests.rs, and the handler's throttle segment tohandler/throttle_segment.rs.Why
Measured against Amazon DynamoDB on 2026-10-24 and 2026-10-25:
Query, 197Scan) refused withIndexReadProvisionedThroughputExceeded, the index ARN and the table message.BatchWriteItemand 5,876PutItem,UpdateItemand single-itemTransactWriteItemsrefused withIndexWriteProvisionedThroughputExceeded, the index ARN and the messageThe level of configured provisioned throughput for one or more global secondary indexes of the table was exceeded. Consider increasing your provisioning level for the under-provisioned global secondary indexes with the UpdateTable API.A client that retries on the index reason gets the service's shape from the emulator. So does an operator who sizes an index from its throttle metrics.
Two behaviours are not modelled, and the differences table states them. The GSI definition has no
OnDemandThroughputmember, so the on-demand index caps (IndexReadMaxOnDemandThroughputExceeded) are not modelled. The server extracts no partition value forQueryorScan, so the hot index key is not modelled either.Refs #716. This PR serves one of the index
Updateactions that #716 lists:ProvisionedThroughputon a table that stays PROVISIONED. The others are still refused. #1518 tracks the check order of thatUpdatebesideBillingModePAY_PER_REQUEST.Stacking
This branch builds on #557, which stacks on #549, #547, #536, #532 and #529. The change under review is the three commits this branch had on top of #557: the move, the feature with its tests, and the documentation. After them come the merges of #557's current head and the follow-ups below. Once #557 is on
mainthis PR rebases ontomain.Other open PRs
#1442 (eliseong, opened 24 November) adds
provisioned_below_minimum_error, which builds the same two below-1 clauses asvalidate_update_throughput. #1442 uses it for CreateTable and for the table's own UpdateTable throughput.validate_update_throughputbuilds those clauses in one place. Whichever of this PR and #1442 merges second makes it callprovisioned_below_minimum_errorfor them. The null clauses stay here, because the helper of #1442 takes the typedProvisionedThroughputstruct.After #1167 lands, the fields of
ProvisionedThroughputgo throughdeserialize_capacity_units. Theas_i64()path ofvalidate_update_throughputthen needs the same reading of a non-integer figure, such as1.5. Whichever of this PR and #1167 merges second aligns them.Merge of #557's head
2e20ffbb0merges #557 at750c38f79, which carries #549, #547, #536 andmainat95425f5e8. Two files conflicted. Incrates/server/src/handler.rs,mainchanged the throttle segment that this branch moves tohandler/throttle_segment.rs. The merge keeps the call tothrottle_segment::check, passes itmain's metric table name, and dropsmain's inline copy, so the segment exists once.docs/differences-from-dynamodb.mdkeeps #536's partial batch row beside this branch's index row.The follow-up commits:
9e33ecd00makesthrottle_segment::checkrecord its metrics with the account and the metric table name, asmain's inline segment did (fix(metrics): keep each account's metrics apart #955, fix(metrics): record only valid table names #922). The index wire test expects the account dimension, and the helper test'sGsiDescriptiongetsmain's two warm throughput fields.6214479e3merges feat(server/app): console tabs a thin binary adds #557's head again, for its console changes. No file conflicted.9ed9cb73ccorrects the server design doc:ThrottledRequestscarries no index dimension, and the sentence no longer says that it carries the table and operation only.Changes since the 24 November review
mainat a417b2f. Five files conflicted.TokenBucketstays in this branch'sthrottle/bucket.rs. It takesmain'sweb_time::Instantand feat(core): throttle errors carry the service's ThrottlingReasons #532's rule that a debt keeps its token count when the rate changes.throttle/index.rstakesweb_time::Instanttoo. feat(engine): serve a batch partially when a backend throttles some entries #536's table name guard moved intohandler/throttle_segment.rs, so a name the table name rules refuse is not throttled there either.throttle_errortakes the resource ARN as&str, with noNonecase.Servedkeepsindex_nameandbatch_entries.WriteThrottleEventsfor the table as well as the index. It drains the wire tests' buckets by 1,000 units in place of 2.ProvisionedThroughputfromUpdateTableon the four backends, checks its units before the table read, and adds the wire, backend and Python tests.UpdatecarryingProvisionedThroughputnames an index of the table, before any backend write. It uses the lookup and text of theWarmThroughputpath. Before, MongoDB wrote the request's table members and then refused the index. The backends keep their own checks for an index removed after the engine's check.charge_readand the index throttle tests.Testing done
Thirteen manager tests in
throttle/index_tests.rs:register_indexesreplaces the set, and a kept index keeps its balance and takes the new rate.remove_tabledrops the index buckets.Indexcause names an index.Four helper tests:
IndexNamefromQueryandScanonly.Indexcause maps to the two measured bodies.Nine wire tests through
handle_requestagainst the in-memory engine:DescribeTable'sIndexArn, and the metric records it leaves.PutItem,UpdateItemandDeleteItemwith the table at 1000 WCU, and the three records of each refusal.UpdateTableraising the index's throughput ends its refusals.UpdateTabledeleting the index ends its refusals.UpdateTablechanging only the table's throughput keeps the index buckets.Eleven negative controls ran, each on a clean committed tree and restored after. Each failed the tests named for it:
register_indexesappending instead of replacing.remove_tablekeeping the index buckets.At 854a414, the lib runs pass 1189 core tests (one skipped, the golden fixture writer), 904 engine and 581 server tests. They also pass 327 SQLite (one skipped), 87 PostgreSQL, 190 MongoDB (84 skipped without a server) and 191 Cassandra tests. On the build host only, 5 server tests and 2 SQLite tests fail: the
backup_storetests andbackup_catalog::write_lock_tests. Another user owns a directory above their backup root. In the full parallel run one engine restore test timed out (a_stopped_heartbeat_timer_stops_the_restore_before_its_next_write). It passed alone 3 times.batch_partialpasses 18 tests, and the WebAssembly adapter its 3 tests and the corpus.tests/python/test_warm_throughput_updates.pypasses 20 tests against a local server on SQLite, PostgreSQL, MongoDB and Cassandra each. With a backend's index throughput write removed, its storage test fails: the SQLite unit test, and the Python case on PostgreSQL, MongoDB and Cassandra.At a093592, the lib runs pass 1189 core, 906 engine and 581 server tests. They also pass 327 SQLite, 87 PostgreSQL, 190 MongoDB and 191 Cassandra tests, with the same skipped tests. On the build host the same 5 server and 2 SQLite tests fail. The Python file passes 21 tests on SQLite and on MongoDB. One of them sends a new table throughput beside an
Updateof a missing index. With the engine's index check removed, that case fails on MongoDB, because the table takes the new throughput.Checklist
cargo test --workspace --lib; the integration suites run in CI)cargo fmt --check)cargo clippy --all-targets -- -D warnings)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. The wire bodies are the service's measured bodies on an error path the server already sends. The backends write an index's existing throughput field. There is no
Storagetrait, auth, on-disk format or CLI change.Breaking changes
extenddb_core::throttle::ThrottleCausegains theIndex { index_name: String }variant and no longer implementsCopy.ThrottleResultno longer implementsCopy.ThrottleResult::causereturnsOption<&ThrottleCause>.check_capacity_with_partitionandconsume_with_partitiontake anindex_name: Option<&str>last parameter.check_capacityandconsumedo not change. Code outside this workspace that matches the enum exhaustively, copies it, or calls the two_with_partitionmethods changes.extenddb_engine::DispatchMetricsgains the public fieldindex_write_units, so a struct literal outside this workspace that names every field gains it.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.