Skip to content

CBL-8402 : Fix data race on SerialExecutor.currentThread#495

Merged
pasin merged 1 commit into
release/4.1from
CBL-8402
Jun 8, 2026
Merged

CBL-8402 : Fix data race on SerialExecutor.currentThread#495
pasin merged 1 commit into
release/4.1from
CBL-8402

Conversation

@pasin

@pasin pasin commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Make currentThread an AtomicLong so isInsideExecutor() reads a consistent, visible value across pool threads. Clear it with compareAndSet in the finally block so a task that has already claimed the thread for the next run is not cleared.

Make currentThread an AtomicLong so isInsideExecutor() reads a consistent, visible value across pool threads. Clear it with compareAndSet in the finally block so a task that has already claimed the thread for the next run is not cleared.
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

This is a release branch and commits are restricted.

Please confirm this PR is one of the following:

  • A response to a customer ask
  • A change per our security policy
  • A non-functional change (i.e. changes needed for building an older version)
  • A change that has been granted an exception (please comment)

@pasin

pasin commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

Fix an issue reported by QE for 4.1.0.

@pasin pasin requested a review from borrrden June 8, 2026 05:17
@pasin pasin merged commit e095fd4 into release/4.1 Jun 8, 2026
1 check passed
@pasin pasin deleted the CBL-8402 branch June 8, 2026 23:43
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