refactor(lcnode): hybrid cloud add start time in heartbeat

Signed-off-by: zhaochenyang <zhaochenyang@oppo.com>
This commit is contained in:
zhaochenyang 2024-01-24 15:37:09 +08:00 committed by AmazingChi
parent 576d4ce771
commit ae018c58cd
3 changed files with 5 additions and 5 deletions

View File

@ -58,8 +58,9 @@ func (l *LcNode) opMasterHeartbeat(conn net.Conn, p *proto.Packet, remoteAddr st
l.scannerMutex.RLock()
for _, scanner := range l.lcScanners {
result := &proto.LcNodeRuleTaskResponse{
ID: scanner.ID,
LcNode: l.localServerAddr,
ID: scanner.ID,
LcNode: l.localServerAddr,
StartTime: &scanner.now,
LcNodeRuleTaskStatistics: proto.LcNodeRuleTaskStatistics{
Volume: scanner.Volume,
RuleId: scanner.rule.ID,

View File

@ -213,8 +213,7 @@ func (s *LcScanner) Start() (err error) {
Path: strings.TrimPrefix(currentPath, pathSep),
Type: uint32(os.ModeDir),
}
t := time.Now()
response.StartTime = &t
response.StartTime = &s.now
s.firstIn(firstDentry)

View File

@ -6907,7 +6907,7 @@ func (m *Server) SetBucketLifecycle(w http.ResponseWriter, r *http.Request) {
}
_ = m.cluster.SetBucketLifecycle(&req)
sendOkReply(w, r, newSuccessHTTPReply("PutBucketLifecycleConfiguration successful"))
sendOkReply(w, r, newSuccessHTTPReply(fmt.Sprintf("set vol[%v] lifecycle successfully", vol.Name)))
}
func allowedStorageClass(sc string, allowed []uint32) bool {