1

We have one session running in per-thread which creates and processing multiple records in one table which have id as auto increment. While processing we are flushing data and at the end of thread we are committing it but if some exception occurs we rollback the current session in that thread.

So, how auto increment will work as in case of flush vs commit and if in mid it will rollback what will happen to auto increment id?

I have tried to find details on it but didn't find anything. Please help!!

Nikunj Aggarwal
  • 296
  • 5
  • 15

1 Answers1

0

Auto-increment id are "reserved" after flush, no any other sessions can use it It can't work another way. See good explanation https://stackoverflow.com/a/449387/4716980 by jmucchiello