Skip to content

Commit

Permalink
Merge branch '2.0-dev' into d2-4676
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 27, 2024
2 parents 6815717 + 542beec commit 066187b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/incrservice/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import (
"github.com/matrixorigin/matrixone/pkg/txn/client"
)

const (
defaultAllocateTimeout = time.Minute * 3
)

type allocator struct {
logger *log.MOLogger
store IncrValueStore
Expand Down Expand Up @@ -169,7 +173,7 @@ func (a *allocator) run(ctx context.Context) {

func (a *allocator) doAllocate(act action) {
ctx := defines.AttachAccountId(context.Background(), act.accountID)
ctx, cancel := context.WithTimeoutCause(ctx, time.Second*10, moerr.CauseDoAllocate)
ctx, cancel := context.WithTimeoutCause(ctx, defaultAllocateTimeout, moerr.CauseDoAllocate)
defer cancel()

from, to, lastAllocateAt, err := a.store.Allocate(
Expand Down

0 comments on commit 066187b

Please sign in to comment.