Skip to content

Commit

Permalink
autoid_service: fix the result of NextGlobalAutoID() for AUTO_ID_CACHE=1
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao authored and ti-chi-bot committed Aug 31, 2023
1 parent d7ce2f2 commit 670c2b6
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 @@ -425,7 +425,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 670c2b6

Please sign in to comment.