Hello Kudu Jenkins, Adar Dembo,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/13456

to look at the new patch set (#6).

Change subject: [tablet] Support accurate count of rows
......................................................................

[tablet] Support accurate count of rows

  A tablet is consisted of one MRS and a group of DRS. And the
  group of DRS makes up a RowSetTree. Thus, the number of live
  rows in a tablet comes from MRS and RowSetTree.

1.At the beginning, new rows will be written (insert/delete/
  reinsert) into MRS and counter1 holds the number of rows;
2.Next, MRS is being flushed to DRS (flush1):
  When MRS is being flushed, it will be attached to the RowSetTree,
  so we can count rows there (still counter1);
  When MRS is flushed to DRS, new RowSetMetadatas will be created
  and every one has persistent counter2;
3.Then, there will be updates to DRS and they will be accumulated
  in DMS. counter3 holds the number of rows;
4.If DMS is flushed (flush2):
  When DMS is being flushed, it will be attached to the Redo list,
  and its counter3 will be swapped to DeltaTracker;
  When DMS is flushed to Redo, the value of counter3 will be added
  to the counter2 of RowSetMetadata;
5.MinorCompact:
  No influence since any insertions or deletions come from memory;
6.MajorCompact:
  No influence, just like step5;
7.Compact:
  Jjust like step2.
8.For the historical tablets:
  When a negative number is returned, it means it is a historical
  tablet. And a historical tablet can return a positive number of
  live rows after compaction and etc.

                            __counter2(persistent)
                           /
                           |
                   __RowSetMetadata           __counter3
                  /                          /
       flush1     |                          |
[MRS] -------> [ DRS ... ] -- Undo + Redo + DMS
  |                                   ^      |
  \__                                 |______|
     counter1                          flush2

Change-Id: I2e6378e289bb85024c29e96c2b153fc417ed6412
---
M src/kudu/tablet/compaction-test.cc
M src/kudu/tablet/compaction.cc
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/delta_tracker.h
M src/kudu/tablet/deltamemstore-test.cc
M src/kudu/tablet/deltamemstore.cc
M src/kudu/tablet/deltamemstore.h
M src/kudu/tablet/diskrowset-test.cc
M src/kudu/tablet/diskrowset.cc
M src/kudu/tablet/diskrowset.h
M src/kudu/tablet/memrowset-test.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/memrowset.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/mock-rowsets.h
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/rowset_metadata.cc
M src/kudu/tablet/rowset_metadata.h
M src/kudu/tablet/tablet-test-util.h
M src/kudu/tablet/tablet-test.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
23 files changed, 304 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/56/13456/6
--
To view, visit http://gerrit.cloudera.org:8080/13456
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2e6378e289bb85024c29e96c2b153fc417ed6412
Gerrit-Change-Number: 13456
Gerrit-PatchSet: 6
Gerrit-Owner: helifu <hzhel...@corp.netease.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: helifu <hzhel...@corp.netease.com>

Reply via email to