fix chunk.ModifiedTsNs (#4264)
* fix * fix mtime s > ns --------- Co-authored-by: zemul <zhouzemiao@ihuman.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
package s3_constants
|
package s3_constants
|
||||||
|
|
||||||
//Amazon S3 predefined groups
|
// Amazon S3 predefined groups
|
||||||
var (
|
var (
|
||||||
GranteeGroupAllUsers = "http://acs.amazonaws.com/groups/global/AllUsers"
|
GranteeGroupAllUsers = "http://acs.amazonaws.com/groups/global/AllUsers"
|
||||||
GranteeGroupAuthenticatedUsers = "http://acs.amazonaws.com/groups/global/AuthenticatedUsers"
|
GranteeGroupAuthenticatedUsers = "http://acs.amazonaws.com/groups/global/AuthenticatedUsers"
|
||||||
|
|||||||
@@ -154,10 +154,11 @@ func (fs *FilerServer) CacheRemoteObjectToLocalCluster(ctx context.Context, req
|
|||||||
}
|
}
|
||||||
|
|
||||||
chunks = append(chunks, &filer_pb.FileChunk{
|
chunks = append(chunks, &filer_pb.FileChunk{
|
||||||
|
|
||||||
FileId: assignResult.Fid,
|
FileId: assignResult.Fid,
|
||||||
Offset: localOffset,
|
Offset: localOffset,
|
||||||
Size: uint64(size),
|
Size: uint64(size),
|
||||||
ModifiedTsNs: time.Now().Unix(),
|
ModifiedTsNs: time.Now().UnixNano(),
|
||||||
ETag: etag,
|
ETag: etag,
|
||||||
Fid: &filer_pb.FileId{
|
Fid: &filer_pb.FileId{
|
||||||
VolumeId: uint32(fileId.VolumeId),
|
VolumeId: uint32(fileId.VolumeId),
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ func (c *commandVolumeFsck) Do(args []string, commandEnv *CommandEnv, writer io.
|
|||||||
|
|
||||||
if *c.findMissingChunksInFiler {
|
if *c.findMissingChunksInFiler {
|
||||||
// collect all filer file ids and paths
|
// collect all filer file ids and paths
|
||||||
|
|
||||||
if err = c.collectFilerFileIdAndPaths(dataNodeVolumeIdToVInfo, *purgeAbsent, collectCutoffFromAtNs); err != nil {
|
if err = c.collectFilerFileIdAndPaths(dataNodeVolumeIdToVInfo, *purgeAbsent, collectCutoffFromAtNs); err != nil {
|
||||||
return fmt.Errorf("collectFilerFileIdAndPaths: %v", err)
|
return fmt.Errorf("collectFilerFileIdAndPaths: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ type Topology struct {
|
|||||||
|
|
||||||
volumeSizeLimit uint64
|
volumeSizeLimit uint64
|
||||||
replicationAsMin bool
|
replicationAsMin bool
|
||||||
isDisableVacuum bool
|
isDisableVacuum bool
|
||||||
|
|
||||||
Sequence sequence.Sequencer
|
Sequence sequence.Sequencer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user