aboutsummaryrefslogtreecommitdiff
path: root/weed/pb
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-21 13:06:04 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-21 13:06:04 -0700
commit059ef879a8a221bbdb117c4fd69fe092044587b6 (patch)
tree8a582d2708d3ba0332e6cf0fe1f5dd6fc1ccdafc /weed/pb
parentff97acae62e641c6255b18a3be403202557046b2 (diff)
downloadseaweedfs-059ef879a8a221bbdb117c4fd69fe092044587b6.tar.xz
seaweedfs-059ef879a8a221bbdb117c4fd69fe092044587b6.zip
fix issue 986
fix issue 986
Diffstat (limited to 'weed/pb')
-rw-r--r--weed/pb/filer_pb/filer_pb_helper.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/pb/filer_pb/filer_pb_helper.go b/weed/pb/filer_pb/filer_pb_helper.go
index 1017e6910..be59089dd 100644
--- a/weed/pb/filer_pb/filer_pb_helper.go
+++ b/weed/pb/filer_pb/filer_pb_helper.go
@@ -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 {