Skip to content

Commit

Permalink
[fix] rename min_revocable_mem to spill_min_revocable_mem
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhhsg committed Dec 26, 2024
1 parent 2d09980 commit d5b75da
Show file tree
Hide file tree
Showing 240 changed files with 261 additions and 261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ bool PartitionedHashJoinProbeOperatorX::_should_revoke_memory(RuntimeState* stat
auto& local_state = get_local_state(state);
if (local_state._shared_state->need_to_spill) {
const auto revocable_size = _revocable_mem_size(state);
const auto min_revocable_size = state->min_revocable_mem();
const auto min_revocable_size = state->spill_min_revocable_mem();

if (state->get_query_ctx()->low_memory_mode()) {
return revocable_size >
Expand Down
4 changes: 2 additions & 2 deletions be/src/pipeline/pipeline_fragment_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,7 @@ size_t PipelineFragmentContext::get_revocable_size(bool* has_running_task) const
}

size_t revocable_size = task->get_revocable_size();
if (revocable_size > _runtime_state->min_revocable_mem()) {
if (revocable_size > _runtime_state->spill_min_revocable_mem()) {
res += revocable_size;
}
}
Expand All @@ -1842,7 +1842,7 @@ std::vector<PipelineTask*> PipelineFragmentContext::get_revocable_tasks() const
for (const auto& task_instances : _tasks) {
for (const auto& task : task_instances) {
size_t revocable_size_ = task->get_revocable_size();
if (revocable_size_ > _runtime_state->min_revocable_mem() ||
if (revocable_size_ > _runtime_state->spill_min_revocable_mem() ||
(revocable_size_ > 0 && _query_ctx->enable_force_spill())) {
revocable_tasks.emplace_back(task.get());
}
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/runtime_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ class RuntimeState {
return _query_options.__isset.enable_reserve_memory && _query_options.enable_reserve_memory;
}

int64_t min_revocable_mem() const {
int64_t spill_min_revocable_mem() const {
if (_query_options.__isset.min_revocable_mem) {
return std::max(_query_options.min_revocable_mem, (int64_t)1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ suite("variant_mv") {
where g2.actor['id'] > 34259289;
"""
def query3_6 = """
SELECT /*+SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_fragment_exec_instance_num=3,parallel_pipeline_task_num=0,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=32,parallel_scan_min_rows_per_scanner=64,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=1,enable_parallel_result_sink=false,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_common_expr_pushdown=false,enable_local_exchange=true,partitioned_hash_join_rows_threshold=8,partitioned_hash_agg_rows_threshold=8,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,enable_common_expr_pushdown_for_inverted_index=false,enable_delete_sub_predicate_v2=false,min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */
SELECT /*+SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_fragment_exec_instance_num=3,parallel_pipeline_task_num=0,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=32,parallel_scan_min_rows_per_scanner=64,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=1,enable_parallel_result_sink=false,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_common_expr_pushdown=false,enable_local_exchange=true,partitioned_hash_join_rows_threshold=8,partitioned_hash_agg_rows_threshold=8,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,enable_common_expr_pushdown_for_inverted_index=false,enable_delete_sub_predicate_v2=false,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */
g1.id,
g2.type,
floor(cast(g1.actor['id'] as int) + 100.5),
Expand Down
2 changes: 1 addition & 1 deletion regression-test/suites/spill_p0/aggregate_spill.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ suite("aggregate_spill") {
set enable_force_spill = true;
"""
sql """
set min_revocable_mem = 1;
set spill_min_revocable_mem = 1;
"""
sql """
set parallel_pipeline_task_num = 4;
Expand Down
2 changes: 1 addition & 1 deletion regression-test/suites/tpcds_sf1_p1/spill_test/q23.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

suite("q23") {
sql """ set enable_force_spill =true; """
sql """ set min_revocable_mem = 65536; """
sql """ set spill_min_revocable_mem = 65536; """
sql """ use regression_test_tpcds_sf1_p1; """

qt_select1 """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q01_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q02_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q03_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q04_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=500;
set spill_min_revocable_mem=500;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q05_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q06_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q07_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q08_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q09_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q10_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q11_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=100;
set spill_min_revocable_mem=100;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q12_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q13_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q14_1_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q14_2_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q15_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q16_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q17_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q18_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q19_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q20_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q21_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q22_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q23_1_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q23_2_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q24_1_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=100;
set spill_min_revocable_mem=100;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q24_2_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=500;
set spill_min_revocable_mem=500;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q25_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q26_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q27_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q28_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q29_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q30_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q31_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q32_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q33_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite("q34_spill") {
set enable_force_spill=true;
"""
sql """
set min_revocable_mem=1;
set spill_min_revocable_mem=1;
"""
sql """
use regression_test_tpcds_sf1_unique_ck_p1;
Expand Down
Loading

0 comments on commit d5b75da

Please sign in to comment.