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

HIVE-28238: Open Hive ACID txn only for transactional resources #5216

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

deniskuzZ
Copy link
Member

@deniskuzZ deniskuzZ commented Apr 25, 2024

What changes were proposed in this pull request?

Open ACID txn only when transactional resources are present in a query

Why are the changes needed?

Backend db calls optimization

Does this PR introduce any user-facing change?

No

Is the change a dependency upgrade?

No

How was this patch tested?

mvn test -Dtest=ITestDbTxnManager -Dtest.metastore.db=postgres

@kasakrisz
Copy link
Contributor

Is there an apache jira about this change?

Comment on lines 692 to 694
if (dbProduct.isDERBY()) {
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it mean that a txn has to be always opened if the backend db is derby? Even if there are no transactional tables in the statement.

Copy link
Member Author

@deniskuzZ deniskuzZ Apr 30, 2024

Choose a reason for hiding this comment

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

no one is using derby in production, but the main reason is that derby doesn't support multi-column IN construct.
https://stackoverflow.com/questions/48175692/multiple-columns-in-in-clause-apache-derby
tested so far on Postgres, MySQL, Oracle

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe we should consider moving to H2 in tests

@deniskuzZ deniskuzZ changed the title Open Hive ACID txn only for transactional resources HIVE-28238: Open Hive ACID txn only for transactional resources Apr 30, 2024
@deniskuzZ
Copy link
Member Author

Is there an apache jira about this change?

created https://issues.apache.org/jira/browse/HIVE-28238

Copy link

sonarcloud bot commented May 22, 2024

Quality Gate Passed Quality Gate passed

Issues
18 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants