aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/filer_deletion.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-11-15 06:33:36 -0800
committerchrislu <chris.lu@gmail.com>2022-11-15 06:33:36 -0800
commit70a4c98b00d811c01289f26d3602992a0d3f45e1 (patch)
tree8d650eb24623e503ec03ccf45a73f3e61afdbe65 /weed/filer/filer_deletion.go
parent371972a1c212205b51391c17c064e9ea452fee17 (diff)
downloadseaweedfs-70a4c98b00d811c01289f26d3602992a0d3f45e1.tar.xz
seaweedfs-70a4c98b00d811c01289f26d3602992a0d3f45e1.zip
refactor filer_pb.Entry and filer.Entry to use GetChunks()
for later locking on reading chunks
Diffstat (limited to 'weed/filer/filer_deletion.go')
-rw-r--r--weed/filer/filer_deletion.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/filer/filer_deletion.go b/weed/filer/filer_deletion.go
index 504ee2986..439a5296f 100644
--- a/weed/filer/filer_deletion.go
+++ b/weed/filer/filer_deletion.go
@@ -143,17 +143,17 @@ func (f *Filer) deleteChunksIfNotNew(oldEntry, newEntry *Entry) {
return
}
if newEntry == nil {
- f.DeleteChunks(oldEntry.Chunks)
+ f.DeleteChunks(oldEntry.GetChunks())
return
}
var toDelete []*filer_pb.FileChunk
newChunkIds := make(map[string]bool)
newDataChunks, newManifestChunks, err := ResolveChunkManifest(f.MasterClient.GetLookupFileIdFunction(),
- newEntry.Chunks, 0, math.MaxInt64)
+ newEntry.GetChunks(), 0, math.MaxInt64)
if err != nil {
glog.Errorf("Failed to resolve new entry chunks when delete old entry chunks. new: %s, old: %s",
- newEntry.Chunks, oldEntry.Chunks)
+ newEntry.GetChunks(), oldEntry.Chunks)
return
}
for _, newChunk := range newDataChunks {
@@ -164,10 +164,10 @@ func (f *Filer) deleteChunksIfNotNew(oldEntry, newEntry *Entry) {
}
oldDataChunks, oldManifestChunks, err := ResolveChunkManifest(f.MasterClient.GetLookupFileIdFunction(),
- oldEntry.Chunks, 0, math.MaxInt64)
+ oldEntry.GetChunks(), 0, math.MaxInt64)
if err != nil {
glog.Errorf("Failed to resolve old entry chunks when delete old entry chunks. new: %s, old: %s",
- newEntry.Chunks, oldEntry.Chunks)
+ newEntry.GetChunks(), oldEntry.GetChunks())
return
}
for _, oldChunk := range oldDataChunks {