Allow to write group-level lag updates without write-locking the whole LagRegister
#58
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
module:lag_register
Rework the
LagRegister
internal data structure to hold aRwLock
on theGroupWithLag
level.Currently the
LagRegister
looks like this:When we need to update lag information for a specific group, we are holding a whole write-lock on the
LagRegister
:We need to rework this so that each
GroupWithLag
is stored in thelag_by_group
map, wrapped into its ownRwLock
. This way we could access theLagRegister
first-level map with a read-lock, and only request the.write().await
lock on theGroupWithLag
.This would enable concurrent updates of the register, enhancing performance and reducing lock contention drammatically.
The text was updated successfully, but these errors were encountered: