Files
floci/src/main/java/io
TATSUNO “Taz” Yasuhiro 97915d3668 fix(dynamodb): calculate consumed capacity correctly (#3071)
* fix(dynamodb): bill reads on pre-filter size and honor ConsistentRead

ConsumedCapacity for GetItem, Query and Scan now follows the DynamoDB
read billing model. Units are half a unit per 4KB read, doubled for a
strongly consistent read, with the half unit minimum. Query and Scan
carry the pre-filter byte size of the read items out of the service, so
a FilterExpression or a narrow projection no longer makes the read look
cheaper than it is.

Verified with the paritysuite dynamodb-conformance tier1 suite.

* fix(dynamodb): charge secondary index writes in ConsumedCapacity

PutItem, UpdateItem, DeleteItem and BatchWriteItem now report the
index side of a write. Each GSI and LSI is charged by how the write
changes what the index stores. One unit for an insert, an in place
update or a delete, two units when an index key changes, and nothing
when the stored view is unchanged or the item never touches the index.
Under INDEXES the response carries the Table arm plus a per index map
only for the indexes that were charged, and the top level total folds
them in. BatchWriteItem reports one entry per table with summed arms.

Verified with the paritysuite dynamodb-conformance tier1 suite.

* test(dynamodb): pin the ConsumedCapacity billing model

Mirror paritysuite dynamodb-conformance tier1 cases.

* fix(dynamodb): size index reads on the projected view the index stores

* test(dynamodb): pin BatchWriteItem ConsumedCapacity shape and per-table arms

* fix(dynamodb): validate BatchWriteItem ReturnConsumedCapacity and report LSI reads under LocalSecondaryIndexes
2026-09-05 13:31:54 -04:00
..