[ 
https://issues.apache.org/jira/browse/HIVE-26316?focusedWorklogId=781069&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-781069
 ]

ASF GitHub Bot logged work on HIVE-26316:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Jun/22 10:11
            Start Date: 14/Jun/22 10:11
    Worklog Time Spent: 10m 
      Work Description: pvary commented on code in PR #3367:
URL: https://github.com/apache/hive/pull/3367#discussion_r896634780


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/OptimisedBootstrapUtils.java:
##########
@@ -90,6 +98,59 @@ public static boolean checkFileExists(Path dumpPath, 
HiveConf conf, String fileN
     return fs.exists(new Path(dumpPath, fileName));
   }
 
+  public static void prepareAbortTxnsFile(List<NotificationEvent> 
notificationEvents, Set<Long> allOpenTxns,
+                                          Path dumpPath, HiveConf conf) throws 
SemanticException {
+    if (notificationEvents.size() == 0) {
+      return;
+    }
+    Set<Long> txnsOpenedPostCurrEventId = new HashSet<>();
+    MessageDeserializer deserializer = 
ReplUtils.getEventDeserializer(notificationEvents.get(0));
+    for (NotificationEvent event: notificationEvents) {
+      if (event.getEventType().equals(MessageBuilder.OPEN_TXN_EVENT)) {

Review Comment:
   nit: maybe a switch instead of the `else if` statements?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 781069)
    Time Spent: 0.5h  (was: 20m)

> Handle dangling open txns on both src & tgt in unplanned failover.
> ------------------------------------------------------------------
>
>                 Key: HIVE-26316
>                 URL: https://issues.apache.org/jira/browse/HIVE-26316
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Haymant Mangla
>            Assignee: Haymant Mangla
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to