owenmonn commented on PR #5722:
URL: https://github.com/apache/hive/pull/5722#issuecomment-2780958307

   >hive.txn.xlock.write doesn't change the locking type needed for TRUNCATE or 
ANALYZE.
   TRUNCATE takes an EXCLUSIVE lock and ANALYZE - SHARED_READ
   However, it activates the ZeroWaitRead optimization that allows SHARED_READ 
to fail fast and not wait for EXCLUSIVE lock to be released.
   
   You're right. Enabling `ZeroWaitRead` causes existing tests to fail. To 
address this, I've disabled ZeroWaitRead in the existing tests by setting 
`hive.txn.xlock.write=true`.
   
   test failure log:
   ```
   java.lang.RuntimeException: java.lang.RuntimeException: analyze table 
mm_table compute statistics for columns failed: 
   (responseCode = 10, 
    errorMessage = FAILED: Error in acquiring locks: Locks on the underlying 
objects cannot be acquired, retry after some time. 
    LockResponse(lockid:10, state:NOT_ACQUIRED, errorMessage:Unable to acquire 
read lock due to an existing exclusive lock 
   {lockid:9,  intLockId:1, txnid:9, db:default, table:mm_table, 
partition:null, state:ACQUIRED, type:EXCLUSIVE}), 
    hiveErrorCode = 40000,  SQLState = 42000,  exception = Locks on the 
underlying objects cannot be acquired, retry after some time. 
   ```


-- 
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: gitbox-unsubscr...@hive.apache.org

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


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

Reply via email to