mirror of https://github.com/citusdata/citus.git
Fix crash during upgrade from 5.2 to 6.2
This commit fixes the problem where we incorrectly try to reach distributed table cache when the extension is not loaded completely. We tried to reach the cache because we wanted to get reference table information to activate the node. However it is actually not necessary to explicitly activate the nodes which come from master_initialize_node_metadata. Because it only runs during extension creation and at that time there are no reference tables and all nodes are considered as active.pull/1492/head
parent
062734a6f5
commit
cf4592ce28
|
@ -274,7 +274,6 @@ master_initialize_node_metadata(PG_FUNCTION_ARGS)
|
||||||
workerNode->workerRack, false, workerNode->isActive,
|
workerNode->workerRack, false, workerNode->isActive,
|
||||||
&nodeAlreadyExists);
|
&nodeAlreadyExists);
|
||||||
|
|
||||||
ActivateNode(workerNode->workerName, workerNode->workerPort);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PG_RETURN_BOOL(true);
|
PG_RETURN_BOOL(true);
|
||||||
|
@ -1045,7 +1044,7 @@ ParseWorkerNodeFileAndRename()
|
||||||
strlcpy(workerNode->workerRack, nodeRack, WORKER_LENGTH);
|
strlcpy(workerNode->workerRack, nodeRack, WORKER_LENGTH);
|
||||||
workerNode->workerPort = nodePort;
|
workerNode->workerPort = nodePort;
|
||||||
workerNode->hasMetadata = false;
|
workerNode->hasMetadata = false;
|
||||||
workerNode->isActive = false;
|
workerNode->isActive = true;
|
||||||
|
|
||||||
workerNodeList = lappend(workerNodeList, workerNode);
|
workerNodeList = lappend(workerNodeList, workerNode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue