Skip to content

Commit

Permalink
invalidate cache when deleting space
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Apr 25, 2023
1 parent e2a37f1 commit 7d88dec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/invalidate-cache-when-deleting-space.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Invalidate cache when deleting space

Decomposedfs now invalidates the cache when deleting a space.

https://github.com/cs3org/reva/pull/3819
7 changes: 6 additions & 1 deletion pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,12 @@ func (fs *Decomposedfs) DeleteStorageSpace(ctx context.Context, req *provider.De
return err
}

// FIXME remove space blobs
// invalidate cache
if err := fs.lu.MetadataBackend().Purge(n.InternalPath()); err != nil {
return err
}

// TODO remove space blobs with s3 backend by adding a purge method to the Blobstore interface

return nil
}
Expand Down

0 comments on commit 7d88dec

Please sign in to comment.