Skip to content

Commit 7ee937a

Browse files
authored
PBM-1538 Backup is marked as successful despite oplog wasn't uploaded (#1134)
* remove variable shadowing
1 parent 081faf4 commit 7ee937a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pbm/backup/slicer.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ func startOplogSlicer(
5555
return
5656
}
5757

58-
majority, err := topo.IsWriteMajorityRequested(ctx, m, writeConcern)
59-
if err != nil {
60-
l.Error("failed to inspect requested majority: %v", err)
58+
majority, e := topo.IsWriteMajorityRequested(ctx, m, writeConcern)
59+
if e != nil {
60+
l.Error("failed to inspect requested majority: %v", e)
6161
}
62-
currOpTime, err := topo.GetLastWrite(ctx, m, majority)
63-
if err != nil {
64-
if errors.Is(err, context.Canceled) {
62+
currOpTime, e := topo.GetLastWrite(ctx, m, majority)
63+
if e != nil {
64+
if errors.Is(e, context.Canceled) {
6565
return
6666
}
6767

68-
l.Error("failed to get last write: %v", err)
68+
l.Error("failed to get last write: %v", e)
6969
continue
7070
}
7171
if !currOpTime.After(startOpTime) {

0 commit comments

Comments
 (0)