This is similar to how java.util.concurrent.atomic.LongAdder works:
https://github.com/openjdk/jdk/blob/master/src/java.base/sha...
Are there are any other approaches for this problem? Seems like there should be.
It's an interesting approach. In similar cases has anyone got experience using a database more optimized on writes, e.g. Cassandra?
phillip it's called lock striping
This is similar to how java.util.concurrent.atomic.LongAdder works:
https://github.com/openjdk/jdk/blob/master/src/java.base/sha...