hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugene Koifman (JIRA)" <>
Subject [jira] [Commented] (HIVE-17683) Annotate Query Plan with locking information
Date Fri, 13 Jul 2018 00:51:00 GMT


Eugene Koifman commented on HIVE-17683:

[~ikryvenko], sorry, it took a while to get back to this.

Your implementation creates ExplainTask.getJsonLocks() which duplicates a lot of the logic
in DbTxnManger.acquireLocks().  This is problematic because they have to be kept in sync.

Could you refactor it so that they share code?

For example, create a {{LockRequest makeLockRequest(List<ReadEntiry>, List<WriteEntity>)}}
and use it in both places?


Also, the refactoring in acquireLocks() lost
  throw new IllegalArgumentException(String
      .format("Lock type [%s] for Database.Table [%s.%s] is unknown", lockType, t.getDbName(),
This may change how errors are surfaced - not sure it's a good idea.

> Annotate Query Plan with locking information
> --------------------------------------------
>                 Key: HIVE-17683
>                 URL:
>             Project: Hive
>          Issue Type: New Feature
>          Components: Transactions
>            Reporter: Eugene Koifman
>            Assignee: Igor Kryvenko
>            Priority: Critical
>         Attachments: HIVE-17683.01.patch, HIVE-17683.02.patch
> Explore if it's possible to add info about what locks will be asked for to the query
> Lock acquisition (for Acid Lock Manager) is done in DbTxnManager.acquireLocks() which
is called once the query starts running.  Would need to refactor that.

This message was sent by Atlassian JIRA

View raw message