Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/11639 )
Change subject: [compaction] KUDU-2056: Expose a metric for how much a tablet needs to be compacted ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/11639/1/src/kudu/tablet/compaction_policy-test.cc File src/kudu/tablet/compaction_policy-test.cc: http://gerrit.cloudera.org:8080/#/c/11639/1/src/kudu/tablet/compaction_policy-test.cc@314 PS1, Line 314: /* A rowset that's one key wide. : * | : */ : EXPECT_EQ(0.0, ComputeAverageRowsetHeight({ { "A", "A" } })); : : /* A single rowset. : * [ --- ] : */ : EXPECT_EQ(1.0, ComputeAverageRowsetHeight({ { "A", "B" } })); : : /* Two rowsets with no empty space between. : * [ --- ][ --- ] : */ : EXPECT_EQ(1.0, ComputeAverageRowsetHeight({ { "A", "B" }, { "B", "C" } })); : : : /* Three rowsets with no empty spaces between. : * [ --- ][ --- ][ --- ] : */ : EXPECT_EQ(1.0, ComputeAverageRowsetHeight({ { "A", "B" }, : { "B", "C" }, : { "C", "D" } })); : : /* Two rowsets with empty space between them. : * [ --- ] [ --- ] : */ : EXPECT_EQ(1.0, ComputeAverageRowsetHeight({ { "A", "B" }, { "C", "D" } })); : : /* Three rowsets with empty space between them. : * [ --- ] [ --- ] [ --- ] : */ : EXPECT_EQ(1.0, ComputeAverageRowsetHeight({ { "A", "B" }, : { "C", "D" }, : { "E", "F" } })); : : /* Three rowsets with empty space between them, and one is a single key. : * [ --- ] | [ --- ] : */ : EXPECT_EQ(1.0, ComputeAverageRowsetHeight({ { "A", "B" }, : { "C", "C" }, : { "D", "D" } })); > Just making sure I understand, this is the source of trouble for KUDU-1400, Yes, if these rowsets are small and numerous then the fixed cost of processing them in scans can dominate the scan and cause scan requests to time out. http://gerrit.cloudera.org:8080/#/c/11639/1/src/kudu/tablet/rowset_info.cc File src/kudu/tablet/rowset_info.cc: http://gerrit.cloudera.org:8080/#/c/11639/1/src/kudu/tablet/rowset_info.cc@265 PS1, Line 265: push_back > nit: use emplace_back() Can't because that constructor is private. I'm not sure why it is private...but I trust there's a reason so I don't want to change it for the sake of this small, loosely-related-to-the-patch optimization in code that already works fine. http://gerrit.cloudera.org:8080/#/c/11639/1/src/kudu/tablet/tablet.cc File src/kudu/tablet/tablet.cc: http://gerrit.cloudera.org:8080/#/c/11639/1/src/kudu/tablet/tablet.cc@1050 PS1, Line 1050: > nit: spurious change Done -- To view, visit http://gerrit.cloudera.org:8080/11639 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I98493b901d37bb278167ba2fe98d322a86a1f0f9 Gerrit-Change-Number: 11639 Gerrit-PatchSet: 2 Gerrit-Owner: Will Berkeley <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Reviewer: Will Berkeley <[email protected]> Gerrit-Comment-Date: Tue, 16 Oct 2018 17:53:24 +0000 Gerrit-HasComments: Yes
