Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to avoid deadlocks, a very simple scheme is proposed here. All the objects to be locked are sorted lexicographically, and the required mode lock is acquired. Note that in some cases, the list of objects may not be known -- for example in case of dynamic partitions, the list of partitions being modified is not known at compile time -- so, the list is generated conservatively. Since the number of partitions may not be known, an exclusive lock is taken on supposed to be taken (but currently not due to HIVE-3509 bug) on the table, or the prefix that is known.

...