Skip to content

Commit

Permalink
[Chore](fuzzy) remove some spill variable fuzzy (apache#47246)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?
remove some spill variable fuzzy
those spill variables will be deprecated soon
### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [x] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [x] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
  • Loading branch information
BiteTheDDDDt authored Jan 24, 2025
1 parent 61fba92 commit 6b10ee7
Showing 1 changed file with 14 additions and 42 deletions.
56 changes: 14 additions & 42 deletions fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ public enum IgnoreSplitType {
@VariableMgr.VarAttr(name = ENABLE_VECTORIZED_ENGINE, varType = VariableAnnotation.REMOVED)
public boolean enableVectorizedEngine = true;

@VariableMgr.VarAttr(name = ENABLE_PIPELINE_ENGINE, fuzzy = true, needForward = true,
@VariableMgr.VarAttr(name = ENABLE_PIPELINE_ENGINE, fuzzy = false, needForward = true,
varType = VariableAnnotation.REMOVED)
private boolean enablePipelineEngine = true;

Expand Down Expand Up @@ -1219,7 +1219,7 @@ public enum IgnoreSplitType {
@VariableMgr.VarAttr(name = RUNTIME_FILTER_WAIT_TIME_MS, needForward = true)
private int runtimeFilterWaitTimeMs = 1000;

@VariableMgr.VarAttr(name = runtime_filter_wait_infinitely, needForward = true)
@VariableMgr.VarAttr(name = runtime_filter_wait_infinitely, fuzzy = true, needForward = true)
private boolean runtimeFilterWaitInfinitely = false;

@VariableMgr.VarAttr(name = RUNTIME_FILTERS_MAX_NUM, needForward = true)
Expand Down Expand Up @@ -1528,7 +1528,7 @@ public void setEnableLeftZigZag(boolean enableLeftZigZag) {
@VariableMgr.VarAttr(name = ENABLE_COMMON_EXPR_PUSHDOWN, fuzzy = true)
public boolean enableCommonExprPushdown = true;

@VariableMgr.VarAttr(name = ENABLE_LOCAL_EXCHANGE, fuzzy = true, flag = VariableMgr.INVISIBLE,
@VariableMgr.VarAttr(name = ENABLE_LOCAL_EXCHANGE, fuzzy = false, flag = VariableMgr.INVISIBLE,
varType = VariableAnnotation.DEPRECATED)
public boolean enableLocalExchange = true;

Expand Down Expand Up @@ -2220,15 +2220,15 @@ public void setIgnoreShapePlanNodes(String ignoreShapePlanNodes) {
description = {"控制是否启用join算子落盘。默认为 false。",
"Controls whether to enable spill to disk of join operation. "
+ "The default value is false."},
needForward = true, fuzzy = true)
needForward = true, fuzzy = false)
public boolean enableJoinSpill = false;

@VariableMgr.VarAttr(
name = ENABLE_SORT_SPILL,
description = {"控制是否启用排序算子落盘。默认为 false。",
"Controls whether to enable spill to disk of sort operation. "
+ "The default value is false."},
needForward = true, fuzzy = true)
needForward = true, fuzzy = false)
public boolean enableSortSpill = false;

@VariableMgr.VarAttr(
Expand All @@ -2245,30 +2245,30 @@ public void setIgnoreShapePlanNodes(String ignoreShapePlanNodes) {
description = {"控制是否启用聚合算子落盘。默认为 false。",
"Controls whether to enable spill to disk of aggregation operation. "
+ "The default value is false."},
needForward = true, fuzzy = true)
needForward = true, fuzzy = false)
public boolean enableAggSpill = false;

@VariableMgr.VarAttr(
name = ENABLE_FORCE_SPILL,
description = {"控制是否开启强制落盘(即使在内存足够的情况),默认为 false。",
"Controls whether enable force spill."
},
needForward = true, fuzzy = true
needForward = true, fuzzy = false
)
public boolean enableForceSpill = false;

@VariableMgr.VarAttr(
name = DATA_QUEUE_MAX_BLOCKS,
description = {"DataQueue 中每个子队列允许最大的 block 个数",
"Max blocks in DataQueue."},
needForward = true, fuzzy = true)
needForward = true, fuzzy = false)
public long dataQueueMaxBlocks = 1;

@VariableMgr.VarAttr(
name = FUZZY_DISABLE_RUNTIME_FILTER_IN_BE,
description = {"在 BE 上开启禁用 runtime filter 的随机开关,用于测试",
"Disable the runtime filter on the BE for testing purposes."},
needForward = true, fuzzy = false)
needForward = true, fuzzy = true)
public boolean fuzzyDisableRuntimeFilterInBE = false;

// If the memory consumption of sort node exceed this limit, will trigger spill to disk;
Expand All @@ -2280,13 +2280,13 @@ public void setIgnoreShapePlanNodes(String ignoreShapePlanNodes) {

// The memory limit of streaming agg when spilling is enabled
// NOTE: streaming agg operator will not spill to disk.
@VariableMgr.VarAttr(name = SPILL_STREAMING_AGG_MEM_LIMIT, fuzzy = true)
@VariableMgr.VarAttr(name = SPILL_STREAMING_AGG_MEM_LIMIT, fuzzy = false)
public long spillStreamingAggMemLimit = 268435456; //256MB

public static final int MIN_EXTERNAL_AGG_PARTITION_BITS = 4;
public static final int MAX_EXTERNAL_AGG_PARTITION_BITS = 20;
@VariableMgr.VarAttr(name = EXTERNAL_AGG_PARTITION_BITS,
checker = "checkExternalAggPartitionBits", fuzzy = true)
checker = "checkExternalAggPartitionBits", fuzzy = false)
public int externalAggPartitionBits = 5; // means that the hash table will be partitioned into 32 blocks.

@VariableMgr.VarAttr(name = USE_MAX_LENGTH_OF_VARCHAR_IN_CTAS, needForward = true, description = {
Expand Down Expand Up @@ -2502,7 +2502,7 @@ public void initFuzzyModeVariables() {

this.runtimeFilterType = 1 << randomInt;
this.enableParallelScan = random.nextInt(2) == 0;
this.enableRuntimeFilterPrune = (randomInt % 2) == 0;
this.enableRuntimeFilterPrune = (randomInt % 10) == 0;

switch (randomInt) {
case 0:
Expand Down Expand Up @@ -2533,40 +2533,12 @@ public void initFuzzyModeVariables() {
this.enableFoldConstantByBe = false;
}

this.fuzzyDisableRuntimeFilterInBE = true;
}
this.fuzzyDisableRuntimeFilterInBE = random.nextBoolean();
this.runtimeFilterWaitInfinitely = random.nextBoolean();

// set random 1, 10, 100, 1000, 10000
this.topnOptLimitThreshold = (int) Math.pow(10, random.nextInt(5));

// for spill to disk
if (Config.pull_request_id > 10000) {
if (Config.pull_request_id % 2 == 0) {
this.enableJoinSpill = true;
this.enableSortSpill = true;
this.enableAggSpill = true;

randomInt = random.nextInt(4);
switch (randomInt) {
case 0:
this.minRevocableMem = 0;
break;
case 1:
this.minRevocableMem = 1;
break;
case 2:
this.minRevocableMem = 1024 * 1024;
break;
default:
this.minRevocableMem = 100L * 1024 * 1024 * 1024;
break;
}
} else {
this.enableJoinSpill = false;
this.enableSortSpill = false;
this.enableAggSpill = false;
}
}
}

public String printFuzzyVariables() {
Expand Down

0 comments on commit 6b10ee7

Please sign in to comment.