* feat(dynamodb): opt-in per-table item files, split into shards
Every table's items live in one dynamodb-items.json, and any item write
rewrites all of them. A small table that changes often, such as a node
heartbeat table, then keeps rewriting every large table beside it.
Add an opt-in item layout. With item-layout: per-table, items are stored
under dynamodb-items/ as item-shards files per table, and a write saves
only the items it touched:
- persistent rewrites the one shard file that holds the item before the
write returns, and fails the write when that file cannot be written
- hybrid marks the shard dirty and writes dirty shards on the flush
interval; an explicit flush or shutdown reports shards it could not
write
- wal keeps the single-file layout for now and logs a warning
The default, single-file, is unchanged.
On first start, an existing dynamodb-items.json, or a wal snapshot and
log, is migrated through a staging directory moved in place in one step
and then renamed .migrated; a failed migration stops startup and leaves
the old files untouched. DynamoDbService writes single items through the
new MapEntryWriter, and the TTL sweeper removes each item under its item
lock.
Part of #6293
* test(storage): skip read-only directory tests where POSIX permissions are missing