diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OAbstractPaginatedStorage.java b/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OAbstractPaginatedStorage.java index 35f9866e1be..b0bd91baf3f 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OAbstractPaginatedStorage.java +++ b/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OAbstractPaginatedStorage.java @@ -4969,7 +4969,7 @@ private int doAddCluster(String clusterName, final int clusterPos) throws IOExce ((OClusterBasedStorageConfiguration) configuration).updateCluster(cluster.generateClusterConfig()); - sbTreeCollectionManager.createComponent(createdClusterId); + sbTreeCollectionManager.createComponentIfPossible(createdClusterId); } return createdClusterId; diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/ridbag/sbtree/OSBTreeCollectionManagerShared.java b/core/src/main/java/com/orientechnologies/orient/core/storage/ridbag/sbtree/OSBTreeCollectionManagerShared.java index edba9582a62..2dcdba15d02 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/storage/ridbag/sbtree/OSBTreeCollectionManagerShared.java +++ b/core/src/main/java/com/orientechnologies/orient/core/storage/ridbag/sbtree/OSBTreeCollectionManagerShared.java @@ -108,12 +108,13 @@ public void delete(OBonsaiCollectionPointer collectionPointer) { super.delete(collectionPointer); } - public void createComponent(final int clusterId) throws IOException { - checkAccess(); - - final OSBTreeBonsaiLocal tree = new OSBTreeBonsaiLocal<>(FILE_NAME_PREFIX + clusterId, - DEFAULT_EXTENSION, storage); - tree.createComponent(); + public void createComponentIfPossible(final int clusterId) throws IOException { + //ignore creation of ridbags in distributed storage + if (!prohibitAccess) { + final OSBTreeBonsaiLocal tree = new OSBTreeBonsaiLocal<>(FILE_NAME_PREFIX + clusterId, + DEFAULT_EXTENSION, storage); + tree.createComponent(); + } } public long createComponent(final String fileName) throws IOException {