fix(decomposedfs): skip a space whose name attribute is unset#710
Closed
michaelstingl wants to merge 1 commit into
Closed
fix(decomposedfs): skip a space whose name attribute is unset#710michaelstingl wants to merge 1 commit into
michaelstingl wants to merge 1 commit into
Conversation
This was referenced Jun 27, 2026
ListStorageSpaces failed when it resolved a node whose name attribute is gone, which happens when the owning user is deleted (for example by inviting an already-deleted user to a space). The direct-read path returned "node.Xattr ... user.oc.name: no data available" and failed the whole listing with gRPC code 15, and the worker-loop path logged it at error level on every listing. The result is server error-log spam on every space listing that touches such a node, while the listing's API response is unaffected. Treat a node with an unset name attribute as non-existent, the same way the existing !n.Exists branch and the worker-loop sibling already handle a missing node: match metadata.IsAttrUnset and skip the node (the direct-read path returns an empty result, the worker loop continues), logged at debug. Any other read error keeps its existing behaviour. Related: opencloud-eu/opencloud#1878
532b404 to
8ca99f3
Compare
This was referenced Jun 28, 2026
Author
|
Closing in favor of #713, which fixes the same root cause one level down. Both branches here key on 🤖 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
ListStorageSpacesfails when it reads a space node that has nouser.oc.nameattribute. The read returnsnode.Xattr ... user.oc.name: no data available. This state appears after the owning user is deleted while a grant still points at the node, for example after inviting an already-deleted user to a space.Two paths in
pkg/storage/pkg/decomposedfs/spaces.gohandle that read error differently:The fix treats such a node as non-existent, like the adjacent
!n.Existsbranch: it matchesmetadata.IsAttrUnsetand skips it. The direct read returns an empty result, the worker loop continues, and the skip is logged at debug. Other read errors are unchanged.Related Issue
Part of opencloud-eu/opencloud#1878
This fixes the
storage-userserror reported there. It does not clean up the orphaned index entries, and the search service hits the same node at a separate site in the opencloud repository, so the issue is not fully resolved.Motivation and Context
On the list-all path the call still returns and the failure shows up only as error-log lines, repeated on every listing that reads such a node. The id-filter path also fails the call, but that resolves a share for a now-gone user. The issue reports the log noise. The fix removes it and keeps one unreadable node from failing a listing.
How Has This Been Tested?
apiSharingNgShareInvitation/shareInvitations.feature("send share invitation to deleted user"). The server logs the code-15 error during the run; the scenario itself passes.spaces_test.go: remove a space node's name attribute, then check thatListStorageSpacesreturns empty for an id filter and still returns the healthy spaces for a list-all. Red onmain, green with this change.decomposedfspackage passes in agolang:1.25container on an ext4 volume (102 specs);gofmt,go vetandgolangci-lint v2.10.1are clean.Note
On its own, CI shows three failing
decomposedfspurge tests until #709 merges: they broke when #695 merged on top of #672 (a semantic conflict), predate this change, and are fixed by #709. The change here is verified green on top of #709 (above), and this branch will be rebased onto greenmainafter #709 merges.Types of changes
Checklist:
Type:*label via ready-release-go, so no fragment is needed)🤖 drafted with Claude Code, reviewed before submitting.