Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

br: Enable checkpoint advancer to pause tasks lagged too large (#51441) #52555

Merged
Prev Previous commit
Next Next commit
before watch pause
RidRisR authored and ti-chi-bot committed Apr 12, 2024
commit 0cd06c92e70d5840cb264ccaa30f5ef369b75825
6 changes: 6 additions & 0 deletions br/pkg/streamhelper/models.go
Original file line number Diff line number Diff line change
@@ -94,6 +94,12 @@ func Pause(task string) string {
return path.Join(streamKeyPrefix, taskPausePath, task)
}

// PrefixOfPause returns the prefix for pausing the task.
// Normally it would be <prefix>/pause/
func PrefixOfPause() string {
return path.Join(streamKeyPrefix, taskPausePath) + "/"
}

// LastErrorPrefixOf make the prefix for searching last error by some task.
func LastErrorPrefixOf(task string) string {
return strings.TrimSuffix(path.Join(streamKeyPrefix, taskLastErrorPath, task), "/") + "/"