mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-22 05:54:24 +02:00
check deleted chunks faster
This commit is contained in:
1 parent
cd45ab072a
commit
1babec00e7
2 files changed
+5
-18
No files matched your search
@@ -21,16 +21,6 @@ func (fid *FileId) toFileIdString() string {
|
||||
return needle.NewFileId(needle.VolumeId(fid.VolumeId), fid.FileKey, fid.Cookie).String()
|
||||
}
|
||||
|
||||
func ChunkEquals(this, that *FileChunk) bool {
|
||||
if this.Fid == nil{
|
||||
this.Fid, _ = toFileIdObject(this.FileId)
|
||||
}
|
||||
if that.Fid == nil{
|
||||
that.Fid, _ = toFileIdObject(that.FileId)
|
||||
}
|
||||
return this.Fid.FileKey == that.Fid.FileKey && this.Fid.VolumeId == that.Fid.VolumeId && this.Fid.Cookie == that.Fid.Cookie
|
||||
}
|
||||
|
||||
func (c *FileChunk) GetFileIdString() string {
|
||||
if c.FileId != "" {
|
||||
return c.FileId
|
||||
|
||||
Reference in new issue
Block a user