changed flags for schema ddls
@@ -33,22 +33,19 @@ public class OSchemaDistributed extends OSchemaEmbedded {
}
public void acquireSchemaWriteLock(ODatabaseDocumentInternal database) {
- if (isRunLocal(database)) {
- return;
- }
if (executeThroughDistributedStorage(database)) {
((ODatabaseDocumentDistributed) database).acquireDistributedExclusiveLock(0);
- }
+ } else {
super.acquireSchemaWriteLock(database);
}
+ }
@Override
public void releaseSchemaWriteLock(ODatabaseDocumentInternal database, final boolean iSave) {
- if (isRunLocal(database)) {
- return;
- }
try {
+ if (!executeThroughDistributedStorage(database)) {
super.releaseSchemaWriteLock(database, iSave);
+ }
} finally {
if (executeThroughDistributedStorage(database)) {
((ODatabaseDocumentDistributed) database).releaseDistributedExclusiveLock();
@@ -215,11 +212,11 @@ public class OSchemaDistributed extends OSchemaEmbedded {
}
protected boolean isRunLocal(ODatabaseDocumentInternal database) {
- return isDistributeVersionTwo(database) && executeThroughDistributedStorage(database);
+ return true;
}
@Override
public void sendCommand(ODatabaseDocumentInternal database, String command) {
- ((ODatabaseDocumentDistributed) database).sendDDLCommand(command, true);
+ ((ODatabaseDocumentDistributed) database).sendDDLCommand(command, false);
}
}
