Lock implementations to allow zero-wait readers

Learn about the implementation changes introduced in locks to allow zero-wait or no-wait readers. You can enable certain properties to ensure that SHARED_READ does not have to wait for any lock and can fail immediately for a pending EXCLUSIVE DDL operation.

Before upgrade to CDP 7.1.4

By default, the implementation changes as part of this fix are disabled and read operations have to wait to acquire a lock.

After upgrade to CDP 7.1.4

This change introduces a new EXCL_WRITE lock type that improves concurrency of transactions by moving some of the operations to another operation like INSERT OVERWRITE that has a less restrictive lock.

This ensures that regular INSERT INTO operations (with a SHARED_WRITE locktype) that are running concurrently are not hidden by the INSERT OVERWRITE operation (with a EXCL_WRITE locktype).

The new implementation is auto-enabled when either the hive.txn.xlock.write or hive.txn.xlock.iow properties are set to 'false'. This ensures that read operations fail immediately if there is a DDL operation like DROP with EXCLUSIVE lock type.

Action required

Enable the new implementation by setting either hive.txn.xlock.write or hive.txn.xlock.iow to 'false'.

For more information, see HIVE-19369.