Leaderboard & Counting Service · View 12 of 21 · Data
Decisions
- A counter definition is versioned and an event names the version it was counted under. A change of type, bounds, tie-break or window set therefore creates a new version rather than silently reinterpreting events already in the log.
- A ranked view is keyed by (board, scope, version), so publishing is a pointer move and rolling back a bad ranking build is pointing readers at the previous version.
- A retraction is an entity, not a delete. It carries cause, requester and authority, and a correction record links it to the standing it changed.
Why the bucket key looks like that
- (counter, member, window_bucket, shard_no) is what makes a hot key splittable without a schema change: the shard dimension already exists, and the shard map says how many of them are live.
- The sketch column sits beside the exact sum rather than in a second table, so a counter that is both exact and unique-counting is one read.
Risks
- Quarantined contributions are modelled against events, so a held event exists in the log but not in any counter. Any consistency check must know that, or it will report drift that is correct behaviour.
- Pseudonymous member references mean a deletion request has to be executed in the directory and in the log's retraction path, and the two can diverge.