This is an automated email from the ASF dual-hosted git repository.

mahesh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 248ce4aa5ee HIVE-26341: Replication logs & metrics shows last repl id 
as 0 when number of events is zero (Haymant Mangla, reviewed by  Rajesh 
Balamohan and Mahesh Kumar Behera)
248ce4aa5ee is described below

commit 248ce4aa5ee079850b9d81e737493a1309485521
Author: Haymant Mangla <[email protected]>
AuthorDate: Tue Jun 21 10:07:09 2022 +0530

    HIVE-26341: Replication logs & metrics shows last repl id as 0 when number 
of events is zero (Haymant Mangla, reviewed by  Rajesh Balamohan and Mahesh 
Kumar Behera)
---
 .../hive/ql/exec/repl/incremental/IncrementalLoadTasksBuilder.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/incremental/IncrementalLoadTasksBuilder.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/incremental/IncrementalLoadTasksBuilder.java
index c9f0da41678..c5f6d6ed2f2 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/incremental/IncrementalLoadTasksBuilder.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/incremental/IncrementalLoadTasksBuilder.java
@@ -176,7 +176,8 @@ public class IncrementalLoadTasksBuilder {
       taskChainTail = updateIncPendTask;
 
       Map<String, String> dbProps = new HashMap<>();
-      dbProps.put(ReplicationSpec.KEY.CURR_STATE_ID_SOURCE.toString(), 
String.valueOf(lastReplayedEvent));
+      dbProps.put(ReplicationSpec.KEY.CURR_STATE_ID_SOURCE.toString(),
+              String.valueOf((lastReplayedEvent == null) ? eventTo : 
lastReplayedEvent));
       ReplStateLogWork replStateLogWork = new ReplStateLogWork(replLogger, 
dbProps, dumpDirectory,
               metricCollector, shouldFailover);
       Task<?> barrierTask = TaskFactory.get(replStateLogWork, conf);

Reply via email to