Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
ddf614a
refactor(core,server): move the token bucket and the throttle segment…
LeeroyHannigan Oct 25, 2026
fe5f4e6
feat(core,server): per-index throttle buckets for provisioned global …
LeeroyHannigan Oct 25, 2026
d257efd
docs: per-index throttle buckets in the server design and the differe…
LeeroyHannigan Oct 25, 2026
2e20ffb
Merge feat/console-tabs into feat/index-throttle
LeeroyHannigan Nov 17, 2026
9e33ecd
fix(server): record the index throttle metrics with the account and m…
LeeroyHannigan Nov 17, 2026
6214479
Merge feat/console-tabs into feat/index-throttle
LeeroyHannigan Nov 17, 2026
9ed9cb7
docs(design): say that ThrottledRequests carries no index dimension
LeeroyHannigan Nov 17, 2026
521b582
Merge origin/feat/console-tabs into feat/index-throttle
LeeroyHannigan Nov 25, 2026
92cfc50
fix: charge a write to an index only when its item carries the index key
LeeroyHannigan Nov 25, 2026
bdacbd7
test(core): pin the index write throttle message
LeeroyHannigan Nov 25, 2026
854a414
feat(engine,storage): store a provisioned index's new units on Update…
LeeroyHannigan Nov 25, 2026
dd0e111
Merge origin/feat/console-tabs into feat/index-throttle
LeeroyHannigan Nov 25, 2026
b7affdf
fix(engine): refuse an index Update that names no index before any write
LeeroyHannigan Nov 25, 2026
13ead97
refactor(storage): write each repeated index throughput block once
LeeroyHannigan Nov 25, 2026
a093592
refactor(core,server): shorten charge_read and the index throttle tests
LeeroyHannigan Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions crates/core/src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,20 @@ pub struct ThrottlingReason {
/// capacity and one hot-key write) and 2026-10-24 (1,538 read throttles on
/// the table's own capacity, 648 index reads and 162 writes in a second
/// Region, all carrying this text; the 104 index-write bodies of that run
/// carry a different message naming global secondary indexes, which the
/// server does not model). Trailing period.
/// carry a different message naming global secondary indexes,
/// [`INDEX_WRITE_PROVISIONED_THROUGHPUT_EXCEEDED_MESSAGE`]). Trailing period.
pub const PROVISIONED_THROUGHPUT_EXCEEDED_MESSAGE: &str = "The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API.";

/// The `ProvisionedThroughputExceededException` message the service sends
/// when a write to the base table is held back by a provisioned global
/// secondary index's write capacity. Measured 2026-10-24 (104
/// `BatchWriteItem`) and 2026-10-25 (5,876 bodies: 2,376 `PutItem`, 2,000
/// `UpdateItem` and 1,500 single-item `TransactWriteItems`), every body
/// 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";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional. No test pins the text of the index write message. Changing "indexes" to "index" leaves every throttle test passing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 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.


/// The `ThrottlingException` message the service sends on an on-demand table
/// whose partition is hot. Measured 2026-10-20 (11 of 11) and 2026-10-24
/// (7,070 of 7,070, two Regions). No trailing period.
Expand Down
14 changes: 13 additions & 1 deletion crates/core/src/error/throttle_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ fn throttling_reason_serializes_with_the_measured_field_names() {
/// The error document of each throttle class: the namespace, the reasons
/// field and its casing (`ThrottlingReasons` on the provisioned class and
/// `RequestLimitExceeded`, `throttlingReasons` on `ThrottlingException`), the
/// list omitted when empty, and the message. The three measured messages are
/// list omitted when empty, and the message. The four measured messages are
/// written out here, so a change to a message constant fails this test.
#[test]
fn throttle_error_documents_match_the_service() {
Expand All @@ -103,6 +103,7 @@ fn throttle_error_documents_match_the_service() {
let measured_hot_key = "Throughput exceeds the current capacity of your table or index. DynamoDB is automatically scaling your table or index so please try again shortly. If exceptions persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html";
let measured_caps =
"Throughput exceeds the maximum OnDemandThroughput configured on table or index";
let measured_index_write = "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";
let cases = [
(
DynamoDbError::provisioned_throughput_exceeded(
Expand All @@ -115,6 +116,17 @@ fn throttle_error_documents_match_the_service() {
"ThrottlingReasons": listed("TableWriteProvisionedThroughputExceeded"),
}),
),
(
DynamoDbError::provisioned_throughput_exceeded(
INDEX_WRITE_PROVISIONED_THROUGHPUT_EXCEEDED_MESSAGE,
one("IndexWriteProvisionedThroughputExceeded"),
),
serde_json::json!({
"__type": provisioned,
"message": measured_index_write,
"ThrottlingReasons": listed("IndexWriteProvisionedThroughputExceeded"),
}),
),
(
DynamoDbError::throttling(
THROTTLING_EXCEPTION_MESSAGE,
Expand Down
Loading
Loading