KUDU-3568 Fix budgeting constraint test by enabling preset factor

In the failing test TestRowSetCompactionSkipWithBudgetingConstraints
the rowset compaction went ahead even with high memory budget
requirement (at least as per test expectations). The test bases
it memory requirements on number of factor, one of which is
rowset_compaction_delta_memory_factor.
It is set to a very high value so that node on which test is
running is not able to satisfy the memory requirements and
hence skipping of compaction becomes necessary.

Failure can happen due to a bug in the test where we are using
rowset_compaction_delta_memory_factor without setting
rowset_compaction_enforce_preset_factor to true.
Since rowset_compaction_enforce_preset_factor is set to false
by default, which means compaction policy relies on metrics
(instead of memory factor) to come up with memory budgeting numbers.

The test passes in most runs, because the metrics,
(i.e. compact_rs_mem_usage_to_deltas_size_ratio) that compaction
policy relies on, happens to be 0. Due to this, memory budgeting
logic chooses the rowset_compaction_delta_memory_factor
(set to a very high value in this test) as the factor and since the
node doesn't have so much memory, it skips compaction as expected.

In a nutshell, rowset_compaction_delta_memory_factor is used when
when rowset_compaction_enforce_preset_factor is true.
If preset is set to false, test will rely on metrics instead of memory
factor defined by rowset_compaction_delta_memory_factor.

Change-Id: I9df218cd2d8ef3709793db267d5a0d651421dbb6
Reviewed-on: http://gerrit.cloudera.org:8080/21360
Reviewed-by: Attila Bukor <abukor@apache.org>
Reviewed-by: Zoltan Martonka <zmartonka@cloudera.com>
Tested-by: Marton Greber <greber.mx@gmail.com>
1 file changed