Skip to content

fix(decomposedfs): give each ListFolder worker its own copy of the permissions - #928

Merged
butonic merged 1 commit into
opencloud-eu:mainfrom
butonic:fix-listfolder-permissions-race
Oct 29, 2026
Merged

butonic merged 1 commit into
opencloud-eu:mainfrom
butonic:fix-listfolder-permissions-race

Conversation

@butonic

@butonic butonic commented Oct 28, 2026

Copy link
Copy Markdown
Member

The ListFolder workers merged each child's permissions into the parent's permission set, which all of them shared. So a child could show the permissions of its siblings, and the race detector flags the concurrent writes:

WARNING: DATA RACE
Read at 0x00c00218a4b9 by goroutine 2324:
  github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/node.AddPermissions()
      pkg/storage/pkg/decomposedfs/node/permissions.go:232
  github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs.(*Decomposedfs).ListFolder.func2()
      pkg/storage/pkg/decomposedfs/decomposedfs.go:772

Each worker now clones the parent's permissions per child. No test on main lists a folder with several children under -race; a spec in the upload coordinator PR does.

Assisted by Claude Code (claude-opus-5-5): it traced the CI failure and wrote the change and this description.

…ions

The workers merged each child's permissions into the parent's permission
set they all shared, so siblings leaked permissions into each other and
the race detector flagged the concurrent writes.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@butonic
butonic requested a review from aduffeck October 29, 2026 11:55
@butonic
butonic merged commit c7b9e31 into opencloud-eu:main Oct 29, 2026
19 checks passed
@butonic
butonic deleted the fix-listfolder-permissions-race branch October 29, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants