dashmap icon indicating copy to clipboard operation
dashmap copied to clipboard

Feature request: read only iterations not blocking writes

Open estaban opened this issue 4 years ago • 1 comments

At the moment, iterating on the map elements requires to take a read lock on one internal shard. While a thread is iterating on the map, all writes to the locked shard from other threads will block.

This is especially a problem for use cases persisting large caches asynchronously while the application is serving customer traffic.

estaban avatar Jul 07 '21 11:07 estaban

This is something that's fundamentally constrained by the underlying design. It can/will be fixed by a rearchitecture though which is something I have planned to do at some point. Marking this as p-low in the meantime since this isn't possible with the current set of tradeoffs this design makes.

xacrimon avatar Feb 06 '22 15:02 xacrimon