kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpe...@apache.org
Subject [2/2] kudu git commit: Update some comments in Tablet impl and rename a method
Date Sat, 10 Sep 2016 16:54:49 GMT
Update some comments in Tablet impl and rename a method

Rename DoCompactionOrFlush() to DoMergeCompactionOrFlush() to be more
specific about what it does.

Change-Id: I3baf4ce119a37bf92d410c4049e308253e238532
Reviewed-on: http://gerrit.cloudera.org:8080/3981
Reviewed-by: Todd Lipcon <todd@apache.org>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/2ecf034c
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/2ecf034c
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/2ecf034c

Branch: refs/heads/master
Commit: 2ecf034c8dff6d2edb3ea7ee046ea621b2910906
Parents: d46ac5f
Author: Mike Percy <mpercy@apache.org>
Authored: Mon Aug 15 02:41:21 2016 -0700
Committer: Mike Percy <mpercy@apache.org>
Committed: Sat Sep 10 16:53:38 2016 +0000

----------------------------------------------------------------------
 src/kudu/tablet/tablet.cc | 13 +++++++------
 src/kudu/tablet/tablet.h  |  5 +++--
 2 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/2ecf034c/src/kudu/tablet/tablet.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet.cc b/src/kudu/tablet/tablet.cc
index d223c1f..089ec28 100644
--- a/src/kudu/tablet/tablet.cc
+++ b/src/kudu/tablet/tablet.cc
@@ -810,7 +810,7 @@ Status Tablet::FlushInternal(const RowSetsInCompaction& input,
   input.DumpToLog();
   LOG_WITH_PREFIX(INFO) << "Memstore in-memory size: " << old_ms->memory_footprint()
<< " bytes";
 
-  RETURN_NOT_OK(DoCompactionOrFlush(input, mrs_being_flushed));
+  RETURN_NOT_OK(DoMergeCompactionOrFlush(input, mrs_being_flushed));
 
   // Sanity check that no insertions happened during our flush.
   CHECK_EQ(start_insert_count, old_ms->debug_insert_count())
@@ -1270,10 +1270,11 @@ Status Tablet::FlushMetadata(const RowSetVector& to_remove,
   return metadata_->UpdateAndFlush(to_remove_meta, to_add, mrs_being_flushed);
 }
 
-Status Tablet::DoCompactionOrFlush(const RowSetsInCompaction &input, int64_t mrs_being_flushed)
{
+Status Tablet::DoMergeCompactionOrFlush(const RowSetsInCompaction &input,
+                                        int64_t mrs_being_flushed) {
   const char *op_name =
         (mrs_being_flushed == TabletMetadata::kNoMrsFlushed) ? "Compaction" : "Flush";
-  TRACE_EVENT2("tablet", "Tablet::DoCompactionOrFlush",
+  TRACE_EVENT2("tablet", "Tablet::DoMergeCompactionOrFlush",
                "tablet_id", tablet_id(),
                "op", op_name);
 
@@ -1355,7 +1356,7 @@ Status Tablet::DoCompactionOrFlush(const RowSetsInCompaction &input,
int64_t mrs
   // - Now we run the "ReupdateMissedDeltas", and copy over the first transaction to the
output
   //   DMS, which later flushes.
   // The end result would be that redos[0] has timestamp 2, and redos[1] has timestamp 1.
-  // This breaks an invariant that the redo files are time-ordered, and would we would probably
+  // This breaks an invariant that the redo files are time-ordered, and we would probably
   // reapply the deltas in the wrong order on the read path.
   //
   // The way that we avoid this case is that DuplicatingRowSet's FlushDeltas method is a
@@ -1498,8 +1499,8 @@ Status Tablet::Compact(CompactFlags flags) {
 
   input.DumpToLog();
 
-  return DoCompactionOrFlush(input,
-                             TabletMetadata::kNoMrsFlushed);
+  return DoMergeCompactionOrFlush(input,
+                                  TabletMetadata::kNoMrsFlushed);
 }
 
 void Tablet::UpdateCompactionStats(MaintenanceOpStats* stats) {

http://git-wip-us.apache.org/repos/asf/kudu/blob/2ecf034c/src/kudu/tablet/tablet.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet.h b/src/kudu/tablet/tablet.h
index f0b8b31..72b08f4 100644
--- a/src/kudu/tablet/tablet.h
+++ b/src/kudu/tablet/tablet.h
@@ -437,8 +437,9 @@ class Tablet {
   Status PickRowSetsToCompact(RowSetsInCompaction *picked,
                               CompactFlags flags) const;
 
-  Status DoCompactionOrFlush(const RowSetsInCompaction &input,
-                             int64_t mrs_being_flushed);
+  // Performs a merge compaction or a flush.
+  Status DoMergeCompactionOrFlush(const RowSetsInCompaction &input,
+                                  int64_t mrs_being_flushed);
 
   // Handle the case in which a compaction or flush yielded no output rows.
   // In this case, we just need to remove the rowsets in 'rowsets' from the


Mime
View raw message