Skip to content

HIVE-29244: Add catalog field into ShowLocksRequest#6314

Open
Neer393 wants to merge 1 commit intoapache:masterfrom
Neer393:HIVE-29244
Open

HIVE-29244: Add catalog field into ShowLocksRequest#6314
Neer393 wants to merge 1 commit intoapache:masterfrom
Neer393:HIVE-29244

Conversation

@Neer393
Copy link
Contributor

@Neer393 Neer393 commented Feb 11, 2026

What changes were proposed in this pull request?

Modified SHowLocksRequest and ShowLocksResponse to include the catalog name and modified the grammar to accept catalog name for getting locks. Added a catalog field to the HMS HIVE_LOCKS table for 4.3.0 and added an alter statement for upgrading from 4.2.0 to 4.3.0

Why are the changes needed?

The changes are needed so that now user can view locks on tables and databases across catalogs.

Does this PR introduce any user-facing change?

No user facing change

How was this patch tested?

Checked the HIVE_LOCKS table and it had the Catalog column and also tried SHOW LOCKS DATABASE dbname; which displayed the catalog column as well. Also tried out SHOW LOCKS DATABASE catname.dbname;

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 84 out of 84 changed files in this pull request and generated 13 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Neer393
Copy link
Contributor Author

Neer393 commented Feb 17, 2026

@zhangbutao need a review here. Thanks

@zhangbutao
Copy link
Contributor

zhangbutao commented Feb 22, 2026

@zhangbutao need a review here. Thanks

@Neer393 Thanks for pinging me. I am on vacation these days. I will review the code once I have time.

Copy link
Contributor

@soumyakanti3578 soumyakanti3578 left a comment

Choose a reason for hiding this comment

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

I have reviewed parts of the PR and will get back to it later. It would be nice to go through the sonar issues and fix the ones introduced by this PR. That will increase maintainability of the code in the future.


LockResponse get_lock_materialization_rebuild(1: string dbName, 2: string tableName, 3: i64 txnId)
bool heartbeat_lock_materialization_rebuild(1: string dbName, 2: string tableName, 3: i64 txnId)
LockResponse get_lock_materialization_rebuild(1: string catName, 2: string dbName, 3: string tableName, 4: i64 txnId)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a compatibility-breaking change. If we can confirm that this method is only used internally by Hive, then this change is safe. However, if other open-source components also call this method, we need to consider retaining the original method and adding a new one instead.

Based on my current understanding, this method is only used internally by Hive. I’d like to ping other folks to take a look together. cc @dengzhhu653 @deniskuzZ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made changes as asked and also added a unit test and a qtest with different catalog.
I have addressed all comments and fixed the indentation issues raised by sonar qube as well.

Only this comment is to be validated.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants