Skip to content

add "lock_retries" option to avoid infinite loop on concurrent CETS join - #64

Closed
ryblovAV wants to merge 1 commit into
esl:mainfrom
ryblovAV:FACEIT-CETS-JOIN-RETRY
Closed

add "lock_retries" option to avoid infinite loop on concurrent CETS join#64
ryblovAV wants to merge 1 commit into
esl:mainfrom
ryblovAV:FACEIT-CETS-JOIN-RETRY

Conversation

@ryblovAV

@ryblovAV ryblovAV commented Aug 5, 2026

Copy link
Copy Markdown

The CETS join process takes a global lock on all cluster nodes.
When multiple nodes attempt to join simultaneously, acquiring the lock frequently fails.
As a result, global:trans returns aborted, and join_loop retries immediately, creating a long living retry loop

Add a lock_retries join option.
With Retries > 0, global:set_lock executes randomized exponential backoff (via the random_sleep/1 function) between lock attempts, drastically reducing contention when many nodes join at once.

@ryblovAV
ryblovAV force-pushed the FACEIT-CETS-JOIN-RETRY branch from f90b079 to f091ccd Compare August 5, 2026 09:35
@ryblovAV
ryblovAV force-pushed the FACEIT-CETS-JOIN-RETRY branch from f091ccd to b7d508e Compare August 5, 2026 10:08
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.58%. Comparing base (2e7d519) to head (b7d508e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   98.46%   98.58%   +0.11%     
==========================================
  Files          11       11              
  Lines         846      846              
==========================================
+ Hits          833      834       +1     
+ Misses         13       12       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

chrzaszcz added a commit that referenced this pull request Aug 6, 2026
The CETS join process takes a global lock on all cluster nodes.
When multiple nodes attempt to join simultaneously,
acquiring the lock frequently fails.
As a result, global:trans returns aborted, and join_loop retries
immediately, creating a long living retry loop

Original PR: #64

I made the tests less verbose and more configurable.
I also increased the likelihood of failure by increasing the number of
nodes and decreasing the total test timeout.

Now it is reliably failing before the fix, and succeeding after it.
chrzaszcz added a commit that referenced this pull request Aug 6, 2026
The CETS join process takes a global lock on all cluster nodes.
When multiple nodes attempt to join simultaneously,
acquiring the lock frequently fails.
As a result, global:trans returns aborted, and join_loop retries
immediately, creating a long living retry loop

Original PR: #64

I made the tests less verbose and more configurable.
I also increased the likelihood of failure by increasing the number of
nodes and decreasing the total test timeout.

Now it is reliably failing before the fix, and succeeding after it.
chrzaszcz added a commit that referenced this pull request Aug 6, 2026
The CETS join process takes a global lock on all cluster nodes.
When multiple nodes attempt to join simultaneously,
acquiring the lock frequently fails.
As a result, global:trans returns aborted, and join_loop retries
immediately, creating a long living retry loop

Original PR: #64

I made the tests less verbose and more configurable.
I also increased the likelihood of failure by increasing the number of
nodes and decreasing the total test timeout.

Now it is reliably failing before the fix, and succeeding after it.
chrzaszcz added a commit that referenced this pull request Aug 6, 2026
The CETS join process takes a global lock on all cluster nodes.
When multiple nodes attempt to join simultaneously,
acquiring the lock frequently fails.
As a result, global:trans returns aborted, and join_loop retries
immediately, creating a long living retry loop

Original PR: #64

I made the tests less verbose and more configurable.
I also increased the likelihood of failure by increasing the number of
nodes and decreasing the total test timeout.

Now it is reliably failing before the fix, and succeeding after it.
chrzaszcz added a commit that referenced this pull request Aug 6, 2026
The CETS join process takes a global lock on all cluster nodes.
When multiple nodes attempt to join simultaneously,
acquiring the lock frequently fails.
As a result, global:trans returns aborted, and join_loop retries
immediately, creating a long living retry loop

Original PR: #64

I made the tests less verbose and more configurable.
I also increased the likelihood of failure by increasing the number of
nodes and decreasing the total test timeout.

Now it is reliably failing before the fix, and succeeding after it.
chrzaszcz added a commit that referenced this pull request Aug 6, 2026
The CETS join process takes a global lock on all cluster nodes.
When multiple nodes attempt to join simultaneously,
acquiring the lock frequently fails.
As a result, global:trans returns aborted, and join_loop retries
immediately, creating a long living retry loop

Original PR: #64

I made the tests less verbose and more configurable.
I also increased the likelihood of failure by increasing the number of
nodes and decreasing the total test timeout.

Now it is reliably failing before the fix, and succeeding after it.
@chrzaszcz

Copy link
Copy Markdown
Member

Superseded with #65

@chrzaszcz chrzaszcz closed this Aug 6, 2026
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.

2 participants