add check if a node has no disc space left is set OFFLINE
@@ -659,6 +659,10 @@ public class ODatabaseDocumentDistributed extends ODatabaseDocumentEmbedded {
txContext.setStatus(FAILED);
getStorageDistributed().getLocalDistributedDatabase().registerTxContext(requestId, txContext);
throw ex;
+ } catch (OLowDiskSpaceException ex) {
+ getStorageDistributed().getDistributedManager()
+ .setDatabaseStatus(getLocalNodeName(), getName(), ODistributedServerManager.DB_STATUS.OFFLINE);
+ throw ex;
}
getStorageDistributed().getLocalDistributedDatabase().registerTxContext(requestId, txContext);
return true;
@@ -749,6 +753,10 @@ public class ODatabaseDocumentDistributed extends ODatabaseDocumentEmbedded {
try {
OTransactionInternal tx = txContext.getTransaction();
((OAbstractPaginatedStorage) this.getStorage().getUnderlying()).commitPreAllocated(tx);
+ } catch (OLowDiskSpaceException ex) {
+ getStorageDistributed().getDistributedManager()
+ .setDatabaseStatus(getLocalNodeName(), getName(), ODistributedServerManager.DB_STATUS.OFFLINE);
+ throw ex;
} finally {
txContext.destroy();
}
