-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-25346: cleanTxnToWriteIdTable breaks SNAPSHOT isolation #2716
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
Conversation
0d432d5 to
3f1392b
Compare
|
|
||
| } catch (Exception e) { | ||
| throw new MetaException(StringUtils.stringifyException(e)); | ||
| try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use try-with-resorces here for the statement and the dbConnection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could, however, it would introduce 1 more level of nesting, I would prefer to keep it like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe wrong, but the finally is only there for closing the dbConn and the stmt. We can skip that with try-with-resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
however, that would introduce few more levels of nesting: +2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored
...etastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
Show resolved
Hide resolved
...etastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
Show resolved
Hide resolved
...etastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
Show resolved
Hide resolved
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCompactionMetrics.java
Show resolved
Hide resolved
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCompactionMetrics.java
Show resolved
Hide resolved
…ces, removed redundant dbConn in checkRetryable
…uzmenko, reviewed by Peter Vary) Closes apache#2716
…uzmenko, reviewed by Peter Vary) Closes apache#2716
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?