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 committed Aug 31, 2023
1 parent 1057a3e commit b2f3de9
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 @@ -464,7 +464,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)

Check warning on line 467 in autoid_service/autoid.go

View check run for this annotation

Codecov / codecov/patch

autoid_service/autoid.go#L467

Added line #L467 was not covered by tests
var err1 error
currentEnd, err1 = idAcc.Get()
if err1 != nil {
Expand Down

0 comments on commit b2f3de9

Please sign in to comment.