Browse Source

fix chunk.ModifiedTsNs (#4264)

* fix

* fix mtime s > ns

---------

Co-authored-by: zemul <zhouzemiao@ihuman.com>
pull/4267/head
zemul 2 years ago
committed by GitHub
parent
commit
0bf56298d5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      weed/server/filer_grpc_server_remote.go
  2. 1
      weed/shell/command_volume_fsck.go

3
weed/server/filer_grpc_server_remote.go

@ -154,10 +154,11 @@ func (fs *FilerServer) CacheRemoteObjectToLocalCluster(ctx context.Context, req
}
chunks = append(chunks, &filer_pb.FileChunk{
FileId: assignResult.Fid,
Offset: localOffset,
Size: uint64(size),
ModifiedTsNs: time.Now().Unix(),
ModifiedTsNs: time.Now().UnixNano(),
ETag: etag,
Fid: &filer_pb.FileId{
VolumeId: uint32(fileId.VolumeId),

1
weed/shell/command_volume_fsck.go

@ -163,6 +163,7 @@ func (c *commandVolumeFsck) Do(args []string, commandEnv *CommandEnv, writer io.
if *c.findMissingChunksInFiler {
// collect all filer file ids and paths
if err = c.collectFilerFileIdAndPaths(dataNodeVolumeIdToVInfo, *purgeAbsent, collectCutoffFromAtNs); err != nil {
return fmt.Errorf("collectFilerFileIdAndPaths: %v", err)
}

Loading…
Cancel
Save