Add downgrade scan thread num by column num (#35351)

This commit is contained in:
wangbo
2024-05-27 11:42:47 +08:00
committed by yiguolei
parent 6d362c1061
commit c44affb43f
3 changed files with 34 additions and 0 deletions

View File

@ -555,6 +555,8 @@ public class SessionVariable implements Serializable, Writable {
public static final String BYPASS_WORKLOAD_GROUP = "bypass_workload_group";
public static final String MAX_COLUMN_READER_NUM = "max_column_reader_num";
public static final List<String> DEBUG_VARIABLES = ImmutableList.of(
SKIP_DELETE_PREDICATE,
SKIP_DELETE_BITMAP,
@ -682,6 +684,9 @@ public class SessionVariable implements Serializable, Writable {
"whether bypass workload group's limitation, currently only support bypass query queue"})
public boolean bypassWorkloadGroup = false;
@VariableMgr.VarAttr(name = MAX_COLUMN_READER_NUM)
public int maxColumnReaderNum = 20000;
@VariableMgr.VarAttr(name = RESOURCE_VARIABLE)
public String resourceGroup = "";
@ -2346,6 +2351,10 @@ public class SessionVariable implements Serializable, Writable {
return this.bypassWorkloadGroup;
}
public int getMaxColumnReaderNum() {
return this.maxColumnReaderNum;
}
public String getResourceGroup() {
return resourceGroup;
}
@ -3141,6 +3150,7 @@ public class SessionVariable implements Serializable, Writable {
tResult.setScanQueueMemLimit(maxScanQueueMemByte);
tResult.setNumScannerThreads(numScannerThreads);
tResult.setScannerScaleUpRatio(scannerScaleUpRatio);
tResult.setMaxColumnReaderNum(maxColumnReaderNum);
// TODO chenhao, reservation will be calculated by cost
tResult.setMinReservation(0);