mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: Move compress binlog after check result GetCompactionResult error (#30127)
See also: #28873 When datanode returns error or go offline during GetCompactionResult call, the compress binlog logic will panic since it was using a nil result This PR move it after the CheckRPCCall error to prevent this case. Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
f542bdbf3c
commit
15716ec283
@ -287,18 +287,15 @@ func (c *SessionManagerImpl) GetCompactionPlansResults() map[int64]*datapb.Compa
|
||||
),
|
||||
})
|
||||
|
||||
// for compatibility issue, before 2.3.4, resp has only logpath
|
||||
// try to parse path and fill logid
|
||||
for _, result := range resp.Results {
|
||||
binlog.CompressCompactionBinlogs(result.GetSegments())
|
||||
}
|
||||
|
||||
if err := merr.CheckRPCCall(resp, err); err != nil {
|
||||
log.Info("Get State failed", zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
for _, rst := range resp.GetResults() {
|
||||
// for compatibility issue, before 2.3.4, resp has only logpath
|
||||
// try to parse path and fill logid
|
||||
binlog.CompressCompactionBinlogs(rst.GetSegments())
|
||||
plans.Insert(rst.PlanID, rst)
|
||||
}
|
||||
}(nodeID, s)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user