Details
-
Improvement
-
Status: Open
-
Normal
-
Resolution: Unresolved
Description
This change is related to, but somewhat orthogonal to CASSANDRA-6504.
Currently all the shard tuples for a given counter cell are packed, in sorted order, in one binary blob. Thus reconciling N counter cells requires allocating a new byte buffer capable of holding the union of the two context's shards N-1 times.
For writes, in post CASSANDRA-6504 world, it also means reading more data than we have to (the complete context, when all we need is the local node's global shard).
Splitting the context into separate cells, one cell per shard, will help to improve this. We did a similar thing with super columns for CASSANDRA-3237. Incidentally, doing this split is now possible thanks to CASSANDRA-3237.
Doing this would also simplify counter reconciliation logic. Getting rid of old contexts altogether can be done trivially with upgradesstables.
In fact, we should be able to put the logical clock into the cell's timestamp, and use regular Cell-s and regular Cell reconcile() logic for the shards, especially once we get rid of the local/remote shards some time in the future (until then we still have to differentiate between global/remote/local shards and their priority rules).
Attachments
Issue Links
- depends upon
-
CASSANDRA-9811 Tie counter shards' logical clock value to timestamps
- Resolved
- is depended upon by
-
CASSANDRA-7393 Replace counter cache with optimised counter read path
- Open
-
CASSANDRA-8861 HyperLogLog Collection Type
- Open
-
CASSANDRA-8944 Add double_counter Type
- Open
-
CASSANDRA-9663 Support For varint Counter Type
- Open
- is duplicated by
-
CASSANDRA-6405 When making heavy use of counters, neighbor nodes occasionally enter spiral of constant memory consumpion
- Resolved
- is related to
-
CASSANDRA-6504 counters++
- Resolved
- supercedes
-
CASSANDRA-7346 Modify reconcile logic to always pick a tombstone over a counter cell
- Resolved
1.
|
Replace counter cache with optimised counter read path | Open | Unassigned | |
2.
|
Get rid of pre-2.1 created local and remote counter shards | Open | Unassigned |