@@ -398,7 +398,7 @@ func MakeCleanupInfo(ctx context.Context, conn connect.Client, ts primitive.Time
398
398
399
399
beforeChunks := make ([]oplog.OplogChunk , 0 , len (chunks ))
400
400
for _ , chunk := range chunks {
401
- if chunk .EndTS .Before (r .LastWriteTS ) {
401
+ if ! chunk .EndTS .After (r .LastWriteTS ) {
402
402
beforeChunks = append (beforeChunks , chunk )
403
403
}
404
404
}
@@ -419,7 +419,7 @@ func MakeCleanupInfo(ctx context.Context, conn connect.Client, ts primitive.Time
419
419
420
420
beforeChunks := make ([]oplog.OplogChunk , 0 , len (chunks ))
421
421
for _ , chunk := range chunks {
422
- if chunk .EndTS .Before (ts ) {
422
+ if ! chunk .EndTS .After (ts ) {
423
423
beforeChunks = append (beforeChunks , chunk )
424
424
}
425
425
}
@@ -431,7 +431,7 @@ func MakeCleanupInfo(ctx context.Context, conn connect.Client, ts primitive.Time
431
431
beforeChunks := []oplog.OplogChunk {}
432
432
afterChunks := []oplog.OplogChunk {}
433
433
for _ , chunk := range chunks {
434
- if chunk .EndTS .Before (backups [baseIndex ].LastWriteTS ) {
434
+ if ! chunk .EndTS .After (backups [baseIndex ].LastWriteTS ) {
435
435
beforeChunks = append (beforeChunks , chunk )
436
436
} else {
437
437
// keep chunks after the last base snapshot restore time
0 commit comments