made sure that in case of sync request timeout the database stay offline
@@ -1375,6 +1375,11 @@ public abstract class ODistributedAbstractPlugin extends OServerPluginAbstract
final Map<String, Object> results = (Map<String, Object>) sendRequest(databaseName, null, singleNode, deployTask,
getNextMessageIdCounter(), ODistributedRequest.EXECUTION_MODE.RESPONSE, null, null, null).getPayload();
+ if (results == null) {
+ ODistributedServerLog.error(this, nodeName, selectedNodes.toString(), DIRECTION.IN, "Timeout waiting the sync database please set the `distributed.deployDbTaskTimeout` to appropriate value");
+ setDatabaseStatus(nodeName, databaseName, DB_STATUS.NOT_AVAILABLE);
+ return false;
+ }
ODistributedServerLog.debug(this, nodeName, selectedNodes.toString(), DIRECTION.OUT, "Deploy returned: %s", results);
final String dbPath = serverInstance.getDatabaseDirectory() + databaseName;
