Skip to content

Commit

Permalink
+1
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbo committed Nov 1, 2024
1 parent 76950e8 commit 944f91f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.apache.doris.resource.workloadgroup.WorkloadGroup;
import org.apache.doris.resource.workloadgroup.WorkloadGroupMgr;

import com.aliyuncs.utils.StringUtils;
import org.apache.commons.lang3.StringUtils;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.apache.doris.resource.workloadgroup.WorkloadGroup;
import org.apache.doris.resource.workloadgroup.WorkloadGroupMgr;

import com.aliyuncs.utils.StringUtils;
import org.apache.commons.lang3.StringUtils;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public class FeConstants {
// set to false to disable internal schema db
public static boolean enableInternalSchemaDb = true;

// for UT, create internal workload group thread can not start
public static boolean shouldCreateInternalWorkloadGroup = true;

// default scheduler interval is 10 seconds
public static int default_scheduler_interval_millisecond = 10000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.doris.resource.workloadgroup;

import org.apache.doris.catalog.Env;
import org.apache.doris.common.FeConstants;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -31,6 +32,9 @@ public CreateInternalWorkloadGroupThread() {
}

public void run() {
if (!FeConstants.shouldCreateInternalWorkloadGroup) {
return;
}
try {
Env env = Env.getCurrentEnv();
while (!env.isReady()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public Set<Integer> getEnableNereidsRules() {
@BeforeAll
public final void beforeAll() throws Exception {
FeConstants.enableInternalSchemaDb = false;
FeConstants.shouldCreateInternalWorkloadGroup = false;
beforeCreatingConnectContext();
connectContext = createDefaultCtx();
beforeCluster();
Expand Down

0 comments on commit 944f91f

Please sign in to comment.