fix(decomposedfs): tolerate a space root with an unset name attribute#713
Closed
michaelstingl wants to merge 1 commit into
Closed
fix(decomposedfs): tolerate a space root with an unset name attribute#713michaelstingl wants to merge 1 commit into
michaelstingl wants to merge 1 commit into
Conversation
This was referenced Jun 28, 2026
b1be794 to
e56c10e
Compare
ReadNode failed with an internal error when a space root had no user.oc.name attribute, which happens for a half-deleted user space (its node lingers while the name attribute is already gone). Reading the name with XattrString returned the ENODATA error and aborted the read, which surfaces to the caller as code 15. The search service's tree walk stats every space root through this path, so one such node aborted the entire space index and logged "error while indexing a space" on every run; any other ReadNode caller hit the same hard failure. Swallow the unset-name case the same way the owner lookup just above already swallows a missing attribute: match metadata.IsAttrUnset and keep the empty name instead of failing the read. Any other read error keeps its existing behaviour, so a genuine read failure is not hidden. Related: opencloud-eu/opencloud#1878
e56c10e to
83c340c
Compare
9 tasks
Author
|
Closing this. It tolerates the symptom (a nameless space root) on read; it does not address the cause. The root cause is in the hybrid metadata backend: locking an already-deleted space root materialises a node with no attributes (details in opencloud#1878). That is the layer to fix. 🤖 drafted with Claude Code, reviewed before submitting. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
ReadNodefails when a space root has nouser.oc.nameattribute, which happens for a half-deleted user space (the node lingers after the name attribute is gone). Reading the name returns ENODATA and aborts the read, which surfaces to the caller as code 15. The fix swallows the unset-name case inreadNodethe same way the owner lookup just above already does: matchmetadata.IsAttrUnsetand keep the empty name. Any other read error still propagates.Related Issue
Part of opencloud-eu/opencloud#1878
It stops the read crash for every
ReadNodecaller but does not clean up the orphaned index entries the half-deletion leaves behind, so it does not fully resolve the issue.Motivation and Context
Two paths stat a space root through
ReadNodeand hit the failure: the search indexer's tree walk, which logserror while indexing a spaceon every pass, andListStorageSpaces, which fails a listing by id outright. FixingReadNodeat the root covers both, plus every other caller.StorageSpaceFromNodealready tolerates a missing name downstream, so the nameless space flows through without a second failure.How Has This Been Tested?
node_test.go: strip a space root's name attribute,ReadNodeit, assert it returns the node with an empty name andExists == trueinstead of erroring. Red without the change (the exactuser.oc.name: no data available), green with it.decomposedfs/nodepackage green in agolang:1.25container on ext4;gofmt,go vet,golangci-lint v2.10.1clean.shareInvitations.feature"deleted user" scenario, theerror while indexing a spacelog lines drop from 4 to 0 on a patched build.Types of changes
Checklist:
Type:*label via ready-release-go, so no fragment is needed)🤖 drafted with Claude Code, reviewed before submitting.