[chore](session_variable) Add 'data_queue_max_blocks' to prevent the DataQueue from occupying too much memory. (#34017) (#34395)

This commit is contained in:
Jerry Hu
2024-05-05 21:20:33 +08:00
committed by GitHub
parent c3096cabe2
commit 7248420cfd
9 changed files with 69 additions and 1 deletions

View File

@ -493,6 +493,7 @@ public class SessionVariable implements Serializable, Writable {
public static final String ENABLE_JOIN_SPILL = "enable_join_spill";
public static final String ENABLE_SORT_SPILL = "enable_sort_spill";
public static final String ENABLE_AGG_SPILL = "enable_agg_spill";
public static final String DATA_QUEUE_MAX_BLOCKS = "data_queue_max_blocks";
public static final String GENERATE_STATS_FACTOR = "generate_stats_factor";
@ -1745,6 +1746,13 @@ public class SessionVariable implements Serializable, Writable {
needForward = true, fuzzy = true)
public boolean enableAggSpill = false;
@VariableMgr.VarAttr(
name = DATA_QUEUE_MAX_BLOCKS,
description = {"DataQueue 中每个子队列允许最大的 block 个数",
"Max blocks in DataQueue."},
needForward = true, fuzzy = true)
public long dataQueueMaxBlocks = 1;
// If the memory consumption of sort node exceed this limit, will trigger spill to disk;
// Set to 0 to disable; min: 128M
public static final long MIN_EXTERNAL_SORT_BYTES_THRESHOLD = 2097152;
@ -3171,6 +3179,8 @@ public class SessionVariable implements Serializable, Writable {
tResult.setEnableSortSpill(enableSortSpill);
tResult.setEnableAggSpill(enableAggSpill);
tResult.setMinRevocableMem(minRevocableMem);
tResult.setDataQueueMaxBlocks(dataQueueMaxBlocks);
return tResult;
}