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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1f6f7e5ba KUDU-3534 [compaction] Log timestamp of two matching DELETE 
REDO mutations.
1f6f7e5ba is described below

commit 1f6f7e5bafb6a9f497ea92b62c1f268a2fe6c3c3
Author: Ashwani Raina <ara...@cloudera.com>
AuthorDate: Thu Dec 14 18:18:32 2023 +0530

    KUDU-3534 [compaction] Log timestamp of two matching DELETE REDO mutations.
    
    This patch just adds an info message to log timestamp value in case
    two REDO mutations of type DELETE are found to be stamped with same
    time. This is an undesired condition that could possibly happen
    due to corruption of mutation entries. The value will give us an
    idea whether it is 0, garbled or close to some valid timestamp.
    
    Change-Id: I508254a83046818b81db4577bf07265b46a13c9a
    Reviewed-on: http://gerrit.cloudera.org:8080/20792
    Reviewed-by: Abhishek Chennaka <achenn...@cloudera.com>
    Tested-by: Abhishek Chennaka <achenn...@cloudera.com>
    Reviewed-by: Wang Xixu <1450306...@qq.com>
    Reviewed-by: Alexey Serbin <ale...@apache.org>
---
 src/kudu/tablet/compaction.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/kudu/tablet/compaction.cc b/src/kudu/tablet/compaction.cc
index 8f2bba384..2291ea0eb 100644
--- a/src/kudu/tablet/compaction.cc
+++ b/src/kudu/tablet/compaction.cc
@@ -476,7 +476,12 @@ int CompareDuplicatedRows(const CompactionInputRow& left,
     // the row again. If that's the case, the delete with the higher timestamp
     // defines the newer input, or
     int ret = left_last->timestamp().CompareTo(right_last->timestamp());
-    CHECK_NE(0, ret);
+    // Log timestamp and mutation history, invalid ts value could mean 
potential corruption.
+    CHECK_NE(0, ret)
+        << Substitute("different DELETE REDO mutations must not have same 
timestamp, "
+                      "Left Redo Mutations: $0, Right Redo Mutations: $1",
+                      Mutation::StringifyMutationList(*left.row.schema(), 
left.redo_head),
+                      Mutation::StringifyMutationList(*right.row.schema(), 
right.redo_head));
     return ret;
   }
 

Reply via email to