activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <>
Subject [GitHub] activemq-artemis issue #2478: ARTEMIS-2210 PagingStore creation is not prope...
Date Mon, 24 Dec 2018 11:50:22 GMT
Github user franz1981 commented on the issue:
    @gaohoward The synchronized block will block any threads attempting to both getting and
creating a paging store, while a chm::get is lock-free ie won't block any threads and chm::computeIfAbsent
is locked on per-segment basis (that means that depends on the number of segments and how
the hashing of the keys will distribute the entries into the segment.
    Putting a synchronized like this will prevent any threads to do anything on an hot-path,
blocking each others: my advice is to keep chm::get lock-free (as it is now) and into `newStore(storeName)`
use chm::computeIfAbsent to avoid duplicates creatings of `PagingStore` instances.
    This should keep the scalability as it is now without allocating unnecessary instances.


View raw message