Skip to content

Should do the best efforts to release hive table lock #3336

@fengguangyuan

Description

@fengguangyuan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions