alternator: PutItem and UpdateItem omit per-table LWT shard-bounce metrics
Author: dkropachevCreated Aug 25, 2026Updated Sep 16, 2026
Labelsbugarea/alternatorai-assisted
Problem
When an LWT request is forwarded to another shard, PutItem and UpdateItem increment only the global shard_bounce_for_lwt counter. They do not increment the corresponding per-table counter. DeleteItem already increments both counters for the same event.
Current behavior
For a cross-shard PutItem or UpdateItem against table T:
scylla_alternator_shard_bounce_for_lwt +1
scylla_alternator_table_shard_bounce_for_lwt{cf="T"} +0For DeleteItem, both counters increase.
Expected behavior
Every regular-write LWT shard bounce should increment both global and matching per-table bounce counters.
Impact
- Cluster-level routing overhead is visible but cannot be assigned to a table.
- The sum of per-table bounce counters is lower than the global counter.
PutItemandUpdateItemappear cheaper than equivalentDeleteItem.- Operators cannot identify tables producing cross-shard LWT traffic.
- Equivalent LWT events are reported inconsistently across regular write APIs.
Code references
PutItem increments only the global bounce counter:
UpdateItem increments only the global bounce counter:
DeleteItem increments both global and per-table counters:
Source: scylladb/scylladb