All operations during opening of transaction are performed in small steps  instead of opening of single big transaction.
@@ -391,7 +391,7 @@ public abstract class OAbstractPaginatedStorage extends OStorageAbstract
atomicOperationsManager.executeInsideAtomicOperation(
null,
- (atomicOperation) -> {
+ atomicOperation -> {
if (OClusterBasedStorageConfiguration.exists(writeCache)) {
configuration = new OClusterBasedStorageConfiguration(this);
((OClusterBasedStorageConfiguration) configuration)
@@ -401,13 +401,18 @@ public abstract class OAbstractPaginatedStorage extends OStorageAbstract
}
initConfiguration(atomicOperation, contextConfiguration);
+ });
+ atomicOperationsManager.executeInsideAtomicOperation(
+ null,
+ (atomicOperation) -> {
String uuid = configuration.getUuid();
if (uuid == null) {
uuid = UUID.randomUUID().toString();
configuration.setUuid(atomicOperation, uuid);
}
this.uuid = UUID.fromString(uuid);
+ });
checkPageSizeAndRelatedParameters();
@@ -415,15 +420,17 @@ public abstract class OAbstractPaginatedStorage extends OStorageAbstract
sbTreeCollectionManager.load();
- openClusters(atomicOperation);
+ atomicOperationsManager.executeInsideAtomicOperation(null, this::openClusters);
openIndexes();
// we need to check presence of ridbags for backward compatibility with previous
// versions
- checkRidBagsPresence(atomicOperation);
-
+ atomicOperationsManager.executeInsideAtomicOperation(null, this::checkRidBagsPresence);
status = STATUS.OPEN;
+ atomicOperationsManager.executeInsideAtomicOperation(
+ null,
+ (atomicOperation) -> {
final String cs = configuration.getConflictStrategy();
if (cs != null) {
// SET THE CONFLICT STORAGE STRATEGY FROM THE LOADED CONFIGURATION
