Details
-
Improvement
-
Resolution: Fixed
-
Major
-
master
Description
The AtomicUnorderedMap could benefit from shared_locking for the management of map membership, for example size/find/empty can use shared_lock whilst erase/insert can use exclusive locking.
This improvement becomes more useful as the for_each style methods do more work, e.g. the function object which executes under the lock is more expensive. At the moment for_each would execute serially, even if different keys were used, whilst with shared locking they could execute concurrently.
The objects in the map are assumed to themselves be independently 'thread-safe' (e.g. ActiveStream). The AtomicUnorderedMap mutex is assumed to exist for correct/consistent management of the map itself
Attachments
For Gerrit Dashboard: MB-31390 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
99882,5 | MB-31390: [2/3] Add RWLock to AtomicUnorderedMap in write mode | master | kv_engine | Status: MERGED | +2 | +1 |
99883,6 | MB-31390: [3/3] Update AtomicUnorderedMap to use read locking | master | kv_engine | Status: MERGED | +2 | +1 |
99885,4 | MB-31390: [1/3] clang-format atomic_unordered_map.h | master | kv_engine | Status: MERGED | +2 | +1 |