Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Dec 31, 2024
1 parent 48d2828 commit 27e6446
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pkg/tso/keyspace_group_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ func (kgm *KeyspaceGroupManager) mergingChecker(ctx context.Context, mergeTarget
log.Info("start to merge the keyspace group",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList))
zap.Uint32s("merge-list", mergeList))
defer logutil.LogPanic()
defer kgm.wg.Done()

Expand All @@ -1316,7 +1316,7 @@ mergeLoop:
log.Info("merging checker is closed",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList))
zap.Uint32s("merge-list", mergeList))
return
case <-checkTicker.C:
}
Expand All @@ -1326,7 +1326,7 @@ mergeLoop:
log.Warn("unable to get the merge target allocator manager",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("keyspace-group-id", mergeTargetID),
zap.Any("merge-list", mergeList),
zap.Uint32s("merge-list", mergeList),

Check warning on line 1329 in pkg/tso/keyspace_group_manager.go

View check run for this annotation

Codecov / codecov/patch

pkg/tso/keyspace_group_manager.go#L1329

Added line #L1329 was not covered by tests
zap.Error(err))
continue
}
Expand All @@ -1336,7 +1336,7 @@ mergeLoop:
log.Debug("current tso node is not the merge target primary",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList))
zap.Uint32s("merge-list", mergeList))
continue
}
// Check if the keyspace group primaries in the merge map are all gone.
Expand All @@ -1351,7 +1351,7 @@ mergeLoop:
log.Error("failed to check if the keyspace group primary in the merge list has gone",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList),
zap.Uint32s("merge-list", mergeList),

Check warning on line 1354 in pkg/tso/keyspace_group_manager.go

View check run for this annotation

Codecov / codecov/patch

pkg/tso/keyspace_group_manager.go#L1354

Added line #L1354 was not covered by tests
zap.Uint32("merge-id", id),
zap.Any("remaining", mergeMap),
zap.Error(err))
Expand All @@ -1370,7 +1370,7 @@ mergeLoop:
"start to calculate the newly merged TSO",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList))
zap.Uint32s("merge-list", mergeList))
// All the keyspace group primaries in the merge list are gone,
// calculate the newly merged TSO to make sure it is greater than the original ones.
var mergedTS time.Time
Expand All @@ -1380,7 +1380,7 @@ mergeLoop:
log.Error("failed to load the keyspace group TSO",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList),
zap.Uint32s("merge-list", mergeList),

Check warning on line 1383 in pkg/tso/keyspace_group_manager.go

View check run for this annotation

Codecov / codecov/patch

pkg/tso/keyspace_group_manager.go#L1383

Added line #L1383 was not covered by tests
zap.Uint32("merge-id", id),
zap.Time("ts", ts),
zap.Error(err))
Expand All @@ -1396,7 +1396,7 @@ mergeLoop:
log.Info("start to set the newly merged TSO",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList),
zap.Uint32s("merge-list", mergeList),
zap.Time("merged-ts", mergedTS))
err = am.GetAllocator().SetTSO(
tsoutil.GenerateTS(tsoutil.GenerateTimestamp(mergedTS, 1)),
Expand All @@ -1405,7 +1405,7 @@ mergeLoop:
log.Error("failed to update the newly merged TSO",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList),
zap.Uint32s("merge-list", mergeList),

Check warning on line 1408 in pkg/tso/keyspace_group_manager.go

View check run for this annotation

Codecov / codecov/patch

pkg/tso/keyspace_group_manager.go#L1408

Added line #L1408 was not covered by tests
zap.Time("merged-ts", mergedTS),
zap.Error(err))
continue
Expand All @@ -1417,15 +1417,15 @@ mergeLoop:
log.Error("failed to finish the merge",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList),
zap.Uint32s("merge-list", mergeList),

Check warning on line 1420 in pkg/tso/keyspace_group_manager.go

View check run for this annotation

Codecov / codecov/patch

pkg/tso/keyspace_group_manager.go#L1420

Added line #L1420 was not covered by tests
zap.Error(err))
continue
}
kgm.metrics.mergeDuration.Observe(time.Since(startTime).Seconds())
log.Info("finished merging keyspace group",
zap.String("member", kgm.tsoServiceID.ServiceAddr),
zap.Uint32("merge-target-id", mergeTargetID),
zap.Any("merge-list", mergeList),
zap.Uint32s("merge-list", mergeList),
zap.Time("merged-ts", mergedTS))
return
}
Expand Down

0 comments on commit 27e6446

Please sign in to comment.