4 ms·
Usually for this kind of use case you want both INCREMENT and DECREMENT. Using a random number for the "Slot" (AKA "Shard") seems like an anti-pattern. If the
by smlacy 2y ago
Usually for this kind of use case you want both INCREMENT and DECREMENT. Using a random number for the "Slot" (AKA "Shard") seems like an anti-pattern. If the Slot were derived from a hash of the data itself, then DECREMENT would be much more straightforward.
- roywiggins 2y agoHm, why wouldn't decrements work with random slots, if you're always just summing up all the slots to get the final tally?