Skip to content

Commit

Permalink
br: fix checkpoint path (#55266) (#55298)
Browse files Browse the repository at this point in the history
close #55265
  • Loading branch information
ti-chi-bot authored Sep 25, 2024
1 parent 4dd8e8a commit 22899ae
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit 22899ae

Please sign in to comment.