Skip to content

Commit

Permalink
fix(restore): use backup bluster ID in remaining_bytes metric
Browse files Browse the repository at this point in the history
There was a confusion about which cluster ID should
be used for labeling remaining_bytes metric.
When setting remaining_bytes, we used backup cluster ID,
but when decreasing, we used restore cluster ID.
Backup cluster ID should be used in both places
as this metrics describes how many bytes from
which place are yet to be restored. Since we use backup
cluster DC, node ID, etc., we should also use backup
cluster ID.
  • Loading branch information
Michal-Leszczynski committed Oct 28, 2024
1 parent a9a3e78 commit d2067eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/service/restore/tablesdir_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ func (w *tablesWorker) onLasEnd(ctx context.Context, b batch, pr *RunProgress) {
w.metrics.IncreaseRestoreStreamDuration(w.run.ClusterID, pr.Host, timeSub(pr.RestoreStartedAt, pr.RestoreCompletedAt))

labels := metrics.RestoreBytesLabels{
ClusterID: w.run.ClusterID.String(),
SnapshotTag: w.run.SnapshotTag,
ClusterID: b.ClusterID.String(),
SnapshotTag: b.SnapshotTag,
Location: b.Location.String(),
DC: b.DC,
Node: b.NodeID,
Expand Down

0 comments on commit d2067eb

Please sign in to comment.