Fix an issue where flushed segments can turn into sealed (#21566)

/kind improvement

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>
pull/21654/head
Ten Thousand Leaves 2023-01-11 18:57:43 +08:00 committed by GitHub
parent 9f8095996b
commit 8c2c04517e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1310,6 +1310,7 @@ func isFlushState(state commonpb.SegmentState) bool {
// updateSegStateAndPrepareMetrics updates a segment's in-memory state and prepare for the corresponding metric update.
func updateSegStateAndPrepareMetrics(segToUpdate *SegmentInfo, targetState commonpb.SegmentState, metricMutation *segMetricMutation) {
log.Debug("updating segment state and updating metrics",
zap.Int64("segment ID", segToUpdate.GetID()),
zap.String("old state", segToUpdate.GetState().String()),
zap.String("new state", targetState.String()),
zap.Int64("# of rows", segToUpdate.GetNumOfRows()))