belugabehr commented on pull request #1728:
URL: https://github.com/apache/hive/pull/1728#issuecomment-738021939


   @pvary Thanks for the review.
   
   So, the answer is yes.  The timestamps could be out of order.
   
   If two instances of HMS are running at the same time, and let's say they 
both create events at times T and T+1.
   
   The HMS which generates the event at time T could experience a long GC and 
then try to submit it to the DB.  At that point, the event at T+1 is going to 
be submitted first to the table, and receive a lower ID.
   
   However, there does not seem to be any documentation around this constraint.
   
   1. Is there docs somewhere that state that the event times will always be 
increasing from one record to the next?
   2. Isn't it a bit confusing that they are assigned an arbitrary time that 
masks that true event time (debugging, audit issues)?
   3. The time stamps are generated using each HMS's "now" time, which could 
possibly not be adequately synced across HMS instances and this issue of 
in-order timestamps is in jeopardy.  If in-order timestamps are a requirement, 
they should be generated using the `now()` of the SQL server itself as a single 
source of "now" truth.
   
   Thanks!
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to