Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce synchronization for metadata calls in SemiTransactionalHiveMetastore #23890

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

raunaqmorarka
Copy link
Member

@raunaqmorarka raunaqmorarka commented Oct 24, 2024

Description

We don't need to hold lock on SemiTransactionalHiveMetastore object for remote calls which just read metadata. Listing views/tables/databases on metastore can be potentially slow. Holding lock blocks cleanupQuery, which prevents QueryTracker#enforceTimeLimits from failing queries which exceed time limit.

Additional context and related issues

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. there's other methods like this too however, what do we want to do about them? getTableStatistics for example.

Copy link
Contributor

@wendigo wendigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@raunaqmorarka
Copy link
Member Author

Looks good to me. there's other methods like this too however, what do we want to do about them? getTableStatistics for example.

Yes, I only updated what was necessary for now. I expect we will eventually refactor most of this if/when we remove multi-statement commands and ACID from hive, so trying to avoid big changes for now.

…astore

We don't need to hold lock on SemiTransactionalHiveMetastore object for remote calls
which just read metadata. Listing views/tables/databases on metastore can be potentially
slow. Holding lock blocks cleanupQuery, which prevents QueryTracker#enforceTimeLimits
from failing queries which exceed time limit.
@raunaqmorarka raunaqmorarka merged commit 4a704c1 into trinodb:master Oct 24, 2024
56 checks passed
@raunaqmorarka raunaqmorarka deleted the hive-sync branch October 24, 2024 12:01
@github-actions github-actions bot added this to the 464 milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed hive Hive connector
Development

Successfully merging this pull request may close these issues.

3 participants