Hello Kudu Jenkins, Andrew Wong, 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 (#14).

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. At the same
  time, a new capability is added to the tablet superblock to
  ensure that only newly created tablets enable the capability.

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:
   Just like step2.

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

Change-Id: I2e6378e289bb85024c29e96c2b153fc417ed6412
---
M src/kudu/master/sys_catalog.cc
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
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tserver/tablet_copy-test-base.h
M src/kudu/tserver/tablet_copy_client-test.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/ts_tablet_manager.cc
31 files changed, 388 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/56/13456/14
--
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: 14
Gerrit-Owner: helifu <hzhel...@corp.netease.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: helifu <hzhel...@corp.netease.com>

Reply via email to