@@ -2,6 +2,7 @@ package main
2
2
3
3
import (
4
4
"context"
5
+ "fmt"
5
6
"runtime"
6
7
"time"
7
8
@@ -238,7 +239,9 @@ func addRestoreMetaWithError(
238
239
errStr string ,
239
240
args ... any ,
240
241
) error {
241
- l .Error (errStr , args ... )
242
+ errMsg := fmt .Sprintf (errStr , args ... )
243
+
244
+ l .Error (errMsg )
242
245
243
246
meta := & restore.RestoreMeta {
244
247
Type : defs .LogicalBackup ,
@@ -248,7 +251,7 @@ func addRestoreMetaWithError(
248
251
PITR : int64 (cmd .OplogTS .T ),
249
252
StartTS : time .Now ().UTC ().Unix (),
250
253
Status : defs .StatusError ,
251
- Error : errStr ,
254
+ Error : errMsg ,
252
255
Replsets : []restore.RestoreReplset {},
253
256
}
254
257
err := restore .SetRestoreMetaIfNotExists (ctx , conn , meta )
@@ -260,7 +263,7 @@ func addRestoreMetaWithError(
260
263
Name : setName ,
261
264
StartTS : time .Now ().UTC ().Unix (),
262
265
Status : defs .StatusError ,
263
- Error : errStr ,
266
+ Error : errMsg ,
264
267
Conditions : restore.Conditions {},
265
268
}
266
269
err = restore .AddRestoreRSMeta (ctx , conn , cmd .Name , rs )
0 commit comments