You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: prevent lost iterations in CircularKey concurrent worker race
Two workers sharing a DocumentGenerator could both detect end-of-pass
(updateItr >= update_e) before either called resetUpdate(), causing
double-decrements of the plain-int iterations counter in CircularKey.
Each race event silently dropped one full pass, producing fewer total
mutations than expected (observed: 54204 vs 60000 ep_dcp_items_sent
in CDC history retention tests).
Add double-checked locking (synchronized on this.keys) in
has_next_read(), has_next_update(), and has_next_expiry() so only one
worker triggers checkIterations() + reset per pass-end event.
The fast unsynchronized path is preserved for normal in-pass execution,
keeping full worker concurrency for deduplication-sensitive tests.
0 commit comments