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: fix checkpoint path (#55266) #55298

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions br/pkg/checkpoint/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"encoding/json"
"fmt"
"math/rand"
"path"
"strings"
"sync"
"time"
Expand All @@ -41,7 +42,7 @@ import (
"golang.org/x/sync/errgroup"
)

const CheckpointDir = "/checkpoints"
const CheckpointDir = "checkpoints"

type flushPosition struct {
CheckpointDataDir string
Expand Down Expand Up @@ -641,8 +642,8 @@ func (r *CheckpointRunner[K, V]) checkLockFile(ctx context.Context, now int64) e
} else if lock.LockId != r.lockId {
return errors.Errorf("The existing lock will expire in %d seconds. "+
"There may be another BR(%d) running. If not, you can wait for the lock to expire, "+
"or delete the file `%s%s` manually.",
(lock.ExpireAt-now)/1000, lock.LockId, strings.TrimRight(r.storage.URI(), "/"), r.CheckpointLockPath)
"or delete the file `%s` manually.",
(lock.ExpireAt-now)/1000, lock.LockId, path.Join(r.storage.URI(), r.CheckpointLockPath))
}

return nil
Expand Down
Loading