Todd Lipcon has submitted this change and it was merged. Change subject: KUDU-1677. Scanners can return out-of-order rows during a compaction ......................................................................
KUDU-1677. Scanners can return out-of-order rows during a compaction This fixes a bug where a scanner could return out-of-order rows if started during the "duplicating" phase of a compaction. The issue was that DuplicatingRowSet would create a UnionIterator rather than a MergeIterator despite the fact that the root iterator was supposed to be in an ordered mode. Fixing this involved passing the OrderMode down into the NewRowIterator call. This argument is only used by the DuplicatingRowSet for now, but may be useful for other rowset types down the road (e.g. the MemRowSet might be able to scan faster if it could scan in insertion order instead of in key order). I also removed the redundant Tablet::OrderMode enum and instead just passed the protobuf-based enum (from common.proto) all the way through, which simplified things a little bit. Change-Id: I6d5c373e2d56039a3b8be272cb4fea3d5d840e5b Reviewed-on: http://gerrit.cloudera.org:8080/4983 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> --- M src/kudu/tablet/diskrowset-test-base.h M src/kudu/tablet/diskrowset-test.cc M src/kudu/tablet/diskrowset.cc M src/kudu/tablet/diskrowset.h M src/kudu/tablet/major_delta_compaction-test.cc M src/kudu/tablet/memrowset.cc M src/kudu/tablet/memrowset.h M src/kudu/tablet/mock-rowsets.h M src/kudu/tablet/mt-rowset_delta_compaction-test.cc M src/kudu/tablet/rowset.cc M src/kudu/tablet/rowset.h M src/kudu/tablet/tablet-test-base.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_bootstrap-test.cc M src/kudu/tserver/tablet_service.cc 18 files changed, 128 insertions(+), 85 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/4983 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d5c373e2d56039a3b8be272cb4fea3d5d840e5b Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Anonymous Coward #80 Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]>
