Skip to content

Commit

Permalink
autoid_service: fix the result of NextGlobalAutoID() for AUTO_ID_CACH…
Browse files Browse the repository at this point in the history
…E=1 (#46550) (#46566)

close #46545
  • Loading branch information
ti-chi-bot authored Apr 22, 2024
1 parent 7989aaf commit 3917c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoid_service/autoid.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func (s *Service) allocAutoID(ctx context.Context, req *autoid.AutoIDRequest) (*
var currentEnd int64
ctx = kv.WithInternalSourceType(ctx, kv.InternalTxnMeta)
err := kv.RunInNewTxn(ctx, s.store, true, func(ctx context.Context, txn kv.Transaction) error {
idAcc := meta.NewMeta(txn).GetAutoIDAccessors(req.DbID, req.TblID).RowID()
idAcc := meta.NewMeta(txn).GetAutoIDAccessors(req.DbID, req.TblID).IncrementID(model.TableInfoVersion5)
var err1 error
currentEnd, err1 = idAcc.Get()
if err1 != nil {
Expand Down

0 comments on commit 3917c31

Please sign in to comment.