Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue on .flock files after glob to avoid a nasty error log. #2645

Merged
merged 2 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-flock-warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Avoid warning about missing .flock files

These flock files appear randomly because of file locking. We can savely ignore them.

https://github.com/cs3org/reva/pull/2645
4 changes: 4 additions & 0 deletions pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ func (fs *Decomposedfs) ListStorageSpaces(ctx context.Context, filter []*provide

for i := range matches {
var err error
// do not investigate flock files any further. They indicate file locks but are not relevant here.
if strings.HasSuffix(matches[i], ".flock") {
continue
}
// always read link in case storage space id != node id
spaceID, nodeID, err = readSpaceAndNodeFromSpaceTypeLink(matches[i])
if err != nil {
Expand Down