KeDeng has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18054 )

Change subject: KUDU-3340 [compaction] Disable compact on the specified table
......................................................................


Patch Set 21:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/18054/21/src/kudu/tablet/tablet_mm_ops-test.cc
File src/kudu/tablet/tablet_mm_ops-test.cc:

http://gerrit.cloudera.org:8080/#/c/18054/21/src/kudu/tablet/tablet_mm_ops-test.cc@102
PS21, Line 102: all_possible_metrics_
> Seems 'all_possible_metrics_' contains flush and compaction related metrics
I don't think it's necessary to distinguish all the metrics. Because in this 
scenario, all metrics should not be changed.


http://gerrit.cloudera.org:8080/#/c/18054/21/src/kudu/tablet/tablet_mm_ops-test.cc@108
PS21, Line 108: UpdateStats
> Seems this 'UpdateStates' doesn't change metricsā€˜ value actually even if we
I've just tested and will fail when we enable compaction. The changes like this:
diff --git a/src/kudu/tablet/tablet_mm_ops-test.cc 
b/src/kudu/tablet/tablet_mm_ops-test.cc
index 7fa4fb7..4d8e44d 100644
--- a/src/kudu/tablet/tablet_mm_ops-test.cc
+++ b/src/kudu/tablet/tablet_mm_ops-test.cc
@@ -131,7 +131,7 @@ TEST_F(KuduTabletMmOpsTest, TestCompactRowSetsOpCacheStats) 
{
 TEST_F(KuduTabletMmOpsTest, TestDisableCompactRowSetsOp) {
   CompactRowSetsOp op(tablet().get());
   TableExtraConfigPB extra_config;
-  extra_config.set_disable_compaction(true);
+  //extra_config.set_disable_compaction(true);
   NO_FATALS(AlterSchema(*harness_->tablet()->schema(), 
boost::make_optional(extra_config)));
   ASSERT_TRUE(op.DisableCompact());
   NO_FATALS(TestNoAffectedMetrics(&op));
@@ -150,7 +150,7 @@ TEST_F(KuduTabletMmOpsTest, 
TestMinorDeltaCompactionOpCacheStats) {
 TEST_F(KuduTabletMmOpsTest, TestDisableMinorDeltaCompactionOp) {
   MinorDeltaCompactionOp op(tablet().get());
   TableExtraConfigPB extra_config;
-  extra_config.set_disable_compaction(true);
+  //extra_config.set_disable_compaction(true);
   NO_FATALS(AlterSchema(*harness_->tablet()->schema(), 
boost::make_optional(extra_config)));
   ASSERT_TRUE(op.DisableCompact());
   NO_FATALS(TestNoAffectedMetrics(&op));
@@ -167,11 +167,10 @@ TEST_F(KuduTabletMmOpsTest, 
TestMajorDeltaCompactionOpCacheStats) {
                                        
tablet()->metrics()->delta_major_compact_rs_duration }));
 }

-
 TEST_F(KuduTabletMmOpsTest, TestDisableMajorDeltaCompactionOp) {
   MajorDeltaCompactionOp op(tablet().get());
   TableExtraConfigPB extra_config;
-  extra_config.set_disable_compaction(true);
+  //extra_config.set_disable_compaction(true);
   NO_FATALS(AlterSchema(*harness_->tablet()->schema(), 
boost::make_optional(extra_config)));
   ASSERT_TRUE(op.DisableCompact());
   NO_FATALS(TestNoAffectedMetrics(&op));

And the test result is :
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (73 ms total)
[  PASSED  ] 3 tests.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] KuduTabletMmOpsTest.TestDisableCompactRowSetsOp
[  FAILED  ] KuduTabletMmOpsTest.TestDisableMinorDeltaCompactionOp
[  FAILED  ] KuduTabletMmOpsTest.TestDisableMajorDeltaCompactionOp



--
To view, visit http://gerrit.cloudera.org:8080/18054
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia8452bd9151f345fcad72bb9e0f07cd78432757e
Gerrit-Change-Number: 18054
Gerrit-PatchSet: 21
Gerrit-Owner: KeDeng <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Comment-Date: Thu, 06 Jan 2022 03:53:54 +0000
Gerrit-HasComments: Yes

Reply via email to