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
{{ message }}
Repository navigation
Revert "Reduce Number of FsNode Clones in Plain-Rewritable Disks" - #112557
What broke it: PR #111883 (#111883) "Reduce Number of FsNode Clones in Plain-Rewritable Disks", merged 2026-07-28 08:31 UTC. Its one substantive change added
cloneFsNodeIfNotExclusive to FsSnapshot.cpp, letting clonePath mutate an FsNode in place when use_count() == 1 instead of always copying it.
Why that races: use_count() isn't a proof of exclusive ownership here. An FsNode is reachable via its parent's subdirectories map, and a thread reading the node takes no reference of its own —
cloneFsNodeIfNotExclusive receives const FsNodePtr & aliasing the parent's map slot. So while one thread is inside std::make_shared(*node) copying the node's map, the count can drop to 1, and a second
thread then modifies that same node in place. Nodes are shared across independent FsSnapshot objects, each with its own mutex, and roots handed out by getRoot are traversed outside the writing snapshot's mutex —
which is why the TSan report shows disjoint mutex sets (M0,M1 vs M2,M3,M4) for the write in clonePath:109 against the read in FsNode's copy constructor (FsSnapshot.h:33).
How it surfaces: the TSan report aborts the server, so the test fails on the next query with Code: 210 ... Connection refused (172.16.4.10:9000) — not a test-logic failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #111883
Version info
26.8.1.407(included in26.8and later)