Skip to content

DynamoDB: store a dropped ledger's branch copies as their own items #2104

Open

Description

@bplatz

On DynamoDB a dropped-ledger entry is one item that copies every branch's record, and DynamoDB caps an item at 400 KB. That is roughly 900 branches: a drop of a larger ledger, or a restore of one (its Restoring entry adds a fence per branch), cannot write the entry.

Since 5c0c296 (#1980) such a drop or restore is refused with TooLarge (400) before it changes anything, so the ledger is never left half-dropped. But it still cannot be dropped as a whole on DynamoDB; its branches have to be dropped first.

The fix is a layout where each branch copy is its own item under the instance's partition (pk = @{instance}, sk = branch#{name}) and the entry item holds the rest. The registry's protocols rely on single-item compare-and-swap, so the branch items have to be written before the entry and read as belonging to it only through the entry, for example by carrying the entry's version.

Raised in the review of #1980.

Activity

  1. added
    P2
    area:storage
    on Oct 13, 2026
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

    P2area:storage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions