Skip to content

Commit 4983b38

Browse files
committed
Remove bogus implementations of ApplyGetContainingDigests
At the call site we could just check the return value of VirtualApply() to see whether this operation is actually implemented by the files in question.
1 parent fad712e commit 4983b38

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

pkg/filesystem/virtual/placeholder_file.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package virtual
33
import (
44
"context"
55

6-
"github.com/buildbarn/bb-storage/pkg/digest"
76
"github.com/buildbarn/bb-storage/pkg/filesystem"
87

98
"google.golang.org/grpc/codes"
@@ -52,8 +51,6 @@ func (placeholderFile) VirtualApply(data any) bool {
5251
switch p := data.(type) {
5352
case *ApplyUploadFile:
5453
p.Err = status.Error(codes.InvalidArgument, "This file cannot be uploaded, as it is a placeholder")
55-
case *ApplyGetContainingDigests:
56-
p.ContainingDigests = digest.EmptySet
5754
default:
5855
return false
5956
}

pkg/filesystem/virtual/pool_backed_file_allocator.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,6 @@ func (f *fileBackedFile) VirtualApply(data any) bool {
351351
p.Err = syscall.EINVAL
352352
case *ApplyUploadFile:
353353
p.Digest, p.Err = f.uploadFile(p.Context, p.ContentAddressableStorage, p.DigestFunction, p.WritableFileUploadDelay)
354-
case *ApplyGetContainingDigests:
355-
p.ContainingDigests = digest.EmptySet
356354
case *ApplyGetBazelOutputServiceStat:
357355
p.Stat, p.Err = f.getBazelOutputServiceStat(p.DigestFunction)
358356
case *ApplyAppendOutputPathPersistencyDirectoryNode:

0 commit comments

Comments
 (0)