Skip to content

Conversation

@jjezra
Copy link
Contributor

@jjezra jjezra commented Oct 31, 2025

FDBDirectory: When file lock clear is called in parallel by multiple threads, synchronically waiting for the first thread's clear to complete seems to be a better strategy.

Resolves #3713

  FDBDirectory: When file lock clear is called in parallel by multiple threads, synchronically waiting for the first thread's clear to complete seems to be a better strategy.

  Resolves FoundationDB#3713
@jjezra jjezra requested a review from ohadzeliger October 31, 2025 18:32
@jjezra jjezra added the bug fix Change that fixes a bug label Oct 31, 2025
@jjezra jjezra marked this pull request as ready for review November 3, 2025 13:42
}

private void fileLockClearFlushAndClose(boolean isRecovery) {
synchronized (clearingLockNowLock) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Teamscale is reporting that this test is uncovered: https://fdb.teamscale.io/activity/merge-requests/foundationdb-fdb-record-layer/FoundationDB%2Ffdb-record-layer%2F3714
Given that teamscale is not reporting back to PRs right now, it's possible that it is a matter of closing.

This could be an indication that some lower-level tests of FDBDirectoryLockFactory are needed, particularly covering the parallelism indicated in the PR description.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I had something wrong with my teamscale configuration, and it was only showing mixed-mode test coverage, which of course would be 0.
Teamscale is now reporting back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So is this code covered by tests?

@ScottDugas ScottDugas requested review from ScottDugas and removed request for ScottDugas November 3, 2025 17:50
@jjezra jjezra requested a review from ScottDugas November 3, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Change that fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent parallel file lock clear

2 participants