Skip to content

Table updates: provisioned billing without index throughput, and calls while a table is changing #87

Closed

Description

@fctl-sh

Priority: medium (partly unverified against DynamoDB).

  • update_settings(billing=Billing.provisioned(10, 5)) sends throughput for the table only (table.py). DynamoDB is expected to require throughput for every global index when a table switches to provisioned billing (Billing.provisioned says its capacity "is also used for global indexes without their own"), and the tables guide shows this call. The in-memory backend accepts it, also adding a GSI without throughput to a provisioned table (which CreateTable refuses), and keeps index throughput after switching back to on-demand (backend/memory/admin.rs).
  • Follow-up calls while the table is changing (table.py): ensure_tables(wait=False) with two missing indexes sends the second UpdateTable while the first index is still being created (DynamoDB adds one index at a time), and so does a rerun after the 300-second waiter gave up during a long backfill; create_from(wait=False) with a TTL attribute calls UpdateTimeToLive while the table is CREATING. The in-memory backend makes everything active at once, so tests cannot show this.

Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.

Activity

  1. added
    bug
    on Oct 30, 2026
  2. fctl-sh commented on Oct 31, 2026

    @fctl-sh
    ContributorAuthor

    The Python part is handled in #143: update_settings(billing=Billing.provisioned(...)) of an on-demand table gives every global index the table's capacity, and ensure_tables/create_tables(wait=False) wait for each step before the next (a created table before Time to Live, an index still being created before the next one), with Time to Live enabled before indexes are added.

    Left, because DynamoDB's answers are not captured anywhere I could check (moto and dynoxide-rs do not model them) and the sandbox has no AWS credentials: the in-memory backend still accepts a switch to provisioned billing without index capacity and an index added to a provisioned table without capacity, and keeps index capacity after a switch back to on-demand. On a table with one global index, aws dynamodb update-table --table-name t --billing-mode PROVISIONED --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 and a --global-secondary-index-updates Create without ProvisionedThroughput on a provisioned table would settle the messages; describe-table after switching back to PAY_PER_REQUEST the third. Whether DynamoDB takes a second index creation while the first is backfilling (its docs say other operations may follow once backfilling starts) was not verified either; dynamoxy waits, which is safe either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions