Skip to content

Commit 19d87ba

Browse files
fix: support chained mirror properly for delete propagation #4558 (#5197)
1 parent bbfe579 commit 19d87ba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmd/mirror-main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ func (mj *mirrorJob) watchMirrorEvents(ctx context.Context, events []EventInfo)
747747
}
748748
mirrorURL.TotalCount = mj.status.GetCounts()
749749
mirrorURL.TotalSize = mj.status.Get()
750-
if mirrorURL.TargetContent != nil && (mj.opts.isRemove || mj.opts.activeActive) {
750+
if mirrorURL.TargetContent != nil && (mj.opts.isRemove || mj.opts.activeActive || mj.opts.isWatch) {
751751
mj.parallel.queueTask(func() URLs {
752752
return mj.doRemove(ctx, mirrorURL, event)
753753
}, 0)
@@ -995,7 +995,8 @@ func runMirror(ctx context.Context, srcURL, dstURL string, cli *cli.Context, enc
995995
isOverwrite = cli.Bool("overwrite")
996996
}
997997

998-
isWatch := cli.Bool("watch") || cli.Bool("multi-master") || cli.Bool("active-active")
998+
isWatch := cli.Bool("watch") || cli.Bool("multi-master")
999+
isActiveActive := cli.Bool("active-active")
9991000
isRemove := cli.Bool("remove")
10001001
md5, checksum := parseChecksum(cli)
10011002

@@ -1023,7 +1024,7 @@ func runMirror(ctx context.Context, srcURL, dstURL string, cli *cli.Context, enc
10231024
storageClass: cli.String("storage-class"),
10241025
userMetadata: userMetadata,
10251026
encKeyDB: encKeyDB,
1026-
activeActive: isWatch,
1027+
activeActive: isActiveActive,
10271028
}
10281029

10291030
// If we are not using active/active and we are not removing

0 commit comments

Comments
 (0)