dengzhhu653 commented on PR #5929:
URL: https://github.com/apache/hive/pull/5929#issuecomment-3448462078

   > -1
   > 
   > > As far as I know in MySQL this will block others for the same row(the 
same for update), if the 0 row returns, means we have acquired the X tblId row 
lock, why do we need to retry again?
   > 
   > Using retries instead of blocking aligns better with optimistic 
concurrency control, allowing transactions to proceed without waiting and only 
retry if a conflict actually occurs.
   > 
   > The same approach is applied in several areas, including Iceberg’s 
conflict resolution 
([HIVE-26882](https://issues.apache.org/jira/browse/HIVE-26882)) and compaction.
   
   I don't think retry is the good way, it introduces another issue, the 
`COLUMN_STATS` in `TABLE_PARAMS` would be got overwritten, and lead to some 
column markers missing, so it might make the stats import useless.
   For the updating the stats, we have already has the in-process lock, it 
doesn't solve the parallel imports across the HMS instances, somehow we need 
the distributed lock to achieve it, the DB lock is one way.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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