objectfs: copy-on-write Inode rows (never mutate a shared Inode row in place) #177
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 233 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.326
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #177"
general
weight: 0.35
justinsb
objectfs: copy-on-write Inode rows to prevent in-place mutation of shared rows
Previously, CachedInode.Row was mutated in place across write operations in the
controller. Because this row pointer was shared with sds.Change (and thus the
unapplied view overlay and read cache), RPC responses, and WatchVolume event
broadcasts, in-place mutations caused races with readers outside the volume lock
and corrupted historical overlay entries. Stopgap cloning in toEntryAttr worked
around serialization races but left overlay entries mutable across subsequent writes.
This change introduces copy-on-write semantics for Inode rows in objectfs:
and updates CachedInode.Row with the new cloned pointer.
Symlink, Link, WriteFile, TruncateFile, Unlink, Rmdir, Rename, buildErofsTree)
to use mutate or freshly allocated row messages.
proto.Clone in toEntryAttr to be safely removed while keeping only the root Ino
remapping clone when needed.
which is negligible compared to logging changes to the transaction stream, while
enabling readers, caches, overlays, and broadcaster subscribers to share row pointers
safely without holding the volume lock.
GetAttr/Lookup/ReadDir alongside concurrent SetAttr/WriteFile/Rename, WatchVolume
subscribers, and the background applier.
row state as of their change sequence across subsequent mutations.
Fixes #176