Skip to content

Commit

Permalink
Touch the by-type index root when linking spaces to invalidate cache
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Jun 19, 2023
1 parent c9bc7aa commit 2c900cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,9 @@ func (fs *Decomposedfs) linkStorageSpaceType(ctx context.Context, spaceType stri
}
}

return err
// touch index root to invalidate caches
now := time.Now()
return os.Chtimes(filepath.Join(fs.o.Root, "indexes", "by-type"), now, now)
}

func (fs *Decomposedfs) storageSpaceFromNode(ctx context.Context, n *node.Node, checkPermissions bool) (*provider.StorageSpace, error) {
Expand Down

0 comments on commit 2c900cc

Please sign in to comment.