This series adds support for WCU tracking in batch_write_item and tests it. The patches include: Switch the metrics (RCU and WCU) to count units vs half-units as they were, to make the metrics clearer for users. Adding a public static get_half_units function to wcu_consumed_capacity_counter for use by batch write item, which cannot directly use the counter object. Adding WCU calculation support to batch_write_item, based on item size for puts and a fixed 1 WCU for deletes. WCU metrics are updated, and consumed capacity is returned per table when requested. The return handling was refactored to be coroutine-like for easier management of the consumed capacity array. Adding tests that validate WCU calculation for batch put requests on a single table and across multiple tables, ensuring delete operations are counted correctly. Adding a test that validates that WCU metrics are updated correctly during batch write item operations, ensuring the WCU of each item is calculated independently. **Need backport, WCU is partially supported, and is missing from batch_write_item** Fixes #23940 Closes scylladb/scylladb#23941 * github.com:scylladb/scylladb: alternator/test_metrics.py: batch_write validate WCU alternator/test_returnconsumedcapacity.py: Add tests for batch write WCU alternator/executor: add WCU for batch_write_items alternator/consumed_capacity: make wcu get_units public Alternator: Change the WCU/RCU to use units
284 KiB
284 KiB