You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/02/11 16:07:21 UTC

[GitHub] [hive] jkovacs-hwx commented on pull request #1727: HIVE-24463: Add special case for Derby and MySQL in Get Next ID DbNotificationListener

jkovacs-hwx commented on pull request #1727:
URL: https://github.com/apache/hive/pull/1727#issuecomment-777605722


   I'm not sure if LAST_INSERT_ID() usage here is a good idea. It's not only non deterministic in some cases but also does not return the highest value for next_val value in other cases:
   - for batched value generation it returns the first value of the batch which is the smallest value not the highest one which would be needed for next_val
   - for rolled back sessions it does not return the highest value related the last successful value generated
   
   If these happen internally or by any maintenance work on the notifications, the next_val can get broken.
   While it's more elegant to use the DB Engine's solution, this function - last_insert_id() - does not fit for the logic required here.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org