mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 11:47:56 +08:00
refactor filer proto chunk variable from mtime to modified_ts_ns
This commit is contained in:
@@ -78,7 +78,7 @@ func (pages *ChunkedDirtyPages) saveChunkedFileIntervalToStorage(reader io.Reade
|
||||
pages.lastErr = err
|
||||
return
|
||||
}
|
||||
chunk.Mtime = mtime
|
||||
chunk.ModifiedTsNs = mtime
|
||||
pages.fh.AddChunks([]*filer_pb.FileChunk{chunk})
|
||||
pages.fh.entryViewCache = nil
|
||||
glog.V(3).Infof("%v saveToStorage %s [%d,%d)", fileFullPath, chunk.FileId, offset, offset+size)
|
||||
|
@@ -124,8 +124,8 @@ func (fh *FileHandle) Release() {
|
||||
}
|
||||
|
||||
func lessThan(a, b *filer_pb.FileChunk) bool {
|
||||
if a.Mtime == b.Mtime {
|
||||
if a.ModifiedTsNs == b.ModifiedTsNs {
|
||||
return a.Fid.FileKey < b.Fid.FileKey
|
||||
}
|
||||
return a.Mtime < b.Mtime
|
||||
return a.ModifiedTsNs < b.ModifiedTsNs
|
||||
}
|
||||
|
Reference in New Issue
Block a user