What's the problem?
In our practices of overwriting partitions with HiveCatalog, we have more than CLIENT_POOL_SIZE_DEFAULT threads running on ClientPool, no doubts the committing snapshot thread may waiting on the client pool, in which it is possible to lead to hive table lock leak, if it's interrupted at this moment.
In such case, we need to have the bests efforts to release the lock.
Affected code?
``HiveTableOperations.java`
@VisibleForTesting
void doUnlock(long lockId) throws TException, InterruptedException {
released = metaClients.run(client -> {
client.unlock(lockId);
return null;
});
}
How to re-produce?
Have more than CLIENT_POOL_SIZE_DEFAULT threads to do commit, and make the threads interrupted.
What's the problem?
In our practices of overwriting partitions with HiveCatalog, we have more than
CLIENT_POOL_SIZE_DEFAULTthreads running onClientPool, no doubts the committing snapshot thread may waiting on the client pool, in which it is possible to lead to hive table lock leak, if it's interrupted at this moment.In such case, we need to have the bests efforts to release the lock.
Affected code?
``HiveTableOperations.java`
How to re-produce?
Have more than
CLIENT_POOL_SIZE_DEFAULTthreads to do commit, and make the threads interrupted.