Ignore --helper start argument if not first time to start FE (#2159)
This commit is contained in:
@ -687,10 +687,15 @@ public class Catalog {
|
||||
File roleFile = new File(IMAGE_DIR, Storage.ROLE_FILE);
|
||||
File versionFile = new File(IMAGE_DIR, Storage.VERSION_FILE);
|
||||
|
||||
// helper node is the local node. This usually happens when the very
|
||||
// first node to start,
|
||||
// or when one node to restart.
|
||||
if (isMyself()) {
|
||||
// if helper node is point to self, or there is ROLE and VERSION file in local.
|
||||
// get the node type from local
|
||||
if (isMyself() || (roleFile.exists() && versionFile.exists())) {
|
||||
|
||||
if (!isMyself()) {
|
||||
LOG.info("find ROLE and VERSION file in local, ignore helper nodes: {}", helperNodes);
|
||||
}
|
||||
|
||||
// check file integrity, if has.
|
||||
if ((roleFile.exists() && !versionFile.exists())
|
||||
|| (!roleFile.exists() && versionFile.exists())) {
|
||||
LOG.error("role file and version file must both exist or both not exist. "
|
||||
|
||||
@ -69,6 +69,13 @@ public class Checkpoint extends Daemon {
|
||||
|
||||
@Override
|
||||
protected void runOneCycle() {
|
||||
if (!Catalog.getInstance().isReady()) {
|
||||
// here we use getInstance(), not getCurrentCatalog() because we truly want the Catalog instance,
|
||||
// not the Checkpoint catalog instance.
|
||||
// and if catalog is not ready, do not doing checkpoint.
|
||||
return;
|
||||
}
|
||||
|
||||
long imageVersion = 0;
|
||||
long checkPointVersion = 0;
|
||||
Storage storage = null;
|
||||
|
||||
@ -94,6 +94,7 @@ public class RollupJobV2Test {
|
||||
clause.analyze(analyzer);
|
||||
|
||||
FeConstants.runningUnitTest = true;
|
||||
AgentTaskQueue.clearAllTasks();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user