mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix issue 986
fix issue 986
This commit is contained in:
parent
ff97acae62
commit
059ef879a8
|
@ -78,7 +78,7 @@ func (f *Filer) deleteChunksIfNotNew(oldEntry, newEntry *Entry) {
|
|||
for _, oldChunk := range oldEntry.Chunks {
|
||||
found := false
|
||||
for _, newChunk := range newEntry.Chunks {
|
||||
if oldChunk.FileId == newChunk.FileId {
|
||||
if oldChunk.Fid.Equals(newChunk.Fid) {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
|
|
|
@ -21,6 +21,10 @@ func (fid *FileId) toFileId() string {
|
|||
return needle.NewFileId(needle.VolumeId(fid.VolumeId), fid.FileKey, fid.Cookie).String()
|
||||
}
|
||||
|
||||
func (fid *FileId) Equals(that *FileId) bool {
|
||||
return fid.FileKey == that.FileKey && fid.VolumeId == that.VolumeId && fid.Cookie == that.Cookie
|
||||
}
|
||||
|
||||
func BeforeEntrySerialization(chunks []*FileChunk) {
|
||||
|
||||
for _, chunk := range chunks {
|
||||
|
|
Loading…
Reference in a new issue