Skip to content

GH-1290. Fix barrier bypass in DistributedDoubleBarrier due to spurious wakeups or SyncConnected events#1291

Merged
kezhuw merged 1 commit into
apache:masterfrom
appian:GH-1290
Jul 19, 2026
Merged

GH-1290. Fix barrier bypass in DistributedDoubleBarrier due to spurious wakeups or SyncConnected events#1291
kezhuw merged 1 commit into
apache:masterfrom
appian:GH-1290

Conversation

@FluffySkyCat

Copy link
Copy Markdown
Contributor

Fixes GH-1290.

Replace the do { ... } while (false) in internalEnter() with a while (true) loop that re-checks the ZooKeeper children count after every wakeup. This ensures the barrier condition is always verified before returning.

Also removes the hasBeenNotified flag as redundant now that the check is performed in the while loop.

@kezhuw kezhuw closed this Jul 19, 2026
@kezhuw kezhuw reopened this Jul 19, 2026

@kezhuw kezhuw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kezhuw
kezhuw merged commit 81bf992 into apache:master Jul 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DistributedDoubleBarrier - Barrier bypass due to spurious wakeups or SyncConnected evenets

2 participants