hmangla98 commented on a change in pull request #2101:
URL: https://github.com/apache/hive/pull/2101#discussion_r608262506
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -8349,8 +8353,12 @@ public long get_latest_txnid_in_conflict(long txnId)
throws MetaException {
@Override
public void commit_txn(CommitTxnRequest rqst) throws TException {
+ boolean isReplayedReplTxn = rqst.isSetReplPolicy() && rqst.isSetTxn_type()
&&
+ rqst.getTxn_type() == TxnType.REPL_CREATED;
+ boolean isHiveReplTxn = rqst.isSetReplPolicy()
+ && (!rqst.isSetTxn_type() || (rqst.isSetTxn_type() &&
rqst.getTxn_type() != TxnType.REPL_CREATED));
Review comment:
It can be simplified as:
boolean isHiveReplTxn = rqst.isSetReplPolicy() && rqst.getTxn_type() !=
TxnType.REPL_CREATED;
Just that for HiveReplTxn, replPolicy would be contain the dbName and
txnType would not be REPL_CREATED.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]