[bug](group_commit) fix relay wal problem on materialized-view (#29848)
This commit is contained in:
@ -607,7 +607,7 @@ public class SchemaChangeJobV2 extends AlterJobV2 {
|
||||
List<Long> aliveBeIds = Env.getCurrentSystemInfo().getAllBackendIds(true);
|
||||
long expireTime = System.currentTimeMillis() + Config.check_wal_queue_timeout_threshold;
|
||||
while (true) {
|
||||
LOG.info("wai for wal queue size to be empty");
|
||||
LOG.info("wait for wal queue size to be empty");
|
||||
boolean walFinished = Env.getCurrentEnv().getGroupCommitManager()
|
||||
.isPreviousWalFinished(tableId, aliveBeIds);
|
||||
if (walFinished) {
|
||||
|
||||
@ -333,7 +333,12 @@ public class LoadAction extends RestBaseController {
|
||||
.setEnableRoundRobin(true)
|
||||
.needLoadAvailable().build();
|
||||
policy.nextRoundRobinIndex = getLastSelectedBackendIndexAndUpdate();
|
||||
List<Long> backendIds = Env.getCurrentSystemInfo().selectBackendIdsByPolicy(policy, 1);
|
||||
List<Long> backendIds;
|
||||
if (groupCommit) {
|
||||
backendIds = Env.getCurrentSystemInfo().selectBackendIdsByPolicy(policy, -1);
|
||||
} else {
|
||||
backendIds = Env.getCurrentSystemInfo().selectBackendIdsByPolicy(policy, 1);
|
||||
}
|
||||
if (backendIds.isEmpty()) {
|
||||
throw new LoadException(SystemInfoService.NO_BACKEND_LOAD_AVAILABLE_MSG + ", policy: " + policy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user