You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2019/06/06 22:40:21 UTC

[kudu] branch master updated: memrowset: skip all uncommitted mutations when iterating

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

mpercy 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 1865bfa  memrowset: skip all uncommitted mutations when iterating
1865bfa is described below

commit 1865bfa208cd38b59c71765fd74488bf61ed7a1e
Author: Adar Dembo <ad...@cloudera.com>
AuthorDate: Wed May 15 21:48:09 2019 -0700

    memrowset: skip all uncommitted mutations when iterating
    
    We already take advantage of this optimization the DMS and DeltaFiles; not
    sure why we weren't doing it in the MRS.
    
    Change-Id: I6f4049a1524e04660d853474a0c140c602c88d33
    Reviewed-on: http://gerrit.cloudera.org:8080/13531
    Tested-by: Kudu Jenkins
    Reviewed-by: Grant Henke <gr...@apache.org>
    Reviewed-by: Mike Percy <mp...@apache.org>
---
 src/kudu/tablet/memrowset.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/kudu/tablet/memrowset.cc b/src/kudu/tablet/memrowset.cc
index a08d506..ec96c6f 100644
--- a/src/kudu/tablet/memrowset.cc
+++ b/src/kudu/tablet/memrowset.cc
@@ -579,8 +579,11 @@ Status MemRowSet::Iterator::ApplyMutationsToProjectedRow(
        mut != nullptr;
        mut = mut->acquire_next()) {
     if (!opts_.snap_to_include.IsCommitted(mut->timestamp_)) {
-      // This mutation is too new; it should be omitted.
-      continue;
+      // This mutation is too new and should be omitted.
+      //
+      // All subsequent mutations are also too new because their timestamps are
+      // guaranteed to be equal to or greater than this mutation's timestamp.
+      break;
     }
 
     // If the mutation is too old, we still need to apply it (so that the column