endpoint: fix ListStale for step-* abstractions by using replication cursors and falling back to step holds for initial replication

This commit is contained in:
Christian Schwarz
2020-04-06 12:50:11 +02:00
parent ac2eb9f86b
commit f5f94219fd
4 changed files with 120 additions and 47 deletions
+6 -3
View File
@@ -207,13 +207,16 @@ func TryReleaseStepStaleFS(ctx context.Context, fs string, jobID JobID) {
},
JobID: &jobID,
What: AbstractionTypeSet{
AbstractionStepHold: true,
AbstractionStepBookmark: true,
AbstractionStepHold: true,
AbstractionStepBookmark: true,
AbstractionReplicationCursorBookmarkV2: true,
},
Concurrency: 1,
}
staleness, err := ListStale(ctx, q)
if err != nil {
if _, ok := err.(*ListStaleQueryError); ok {
panic(err)
} else if err != nil {
getLogger(ctx).WithError(err).Error("cannot list stale step holds and bookmarks")
return
}