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 a3d31a348e5..9d938de5920 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 @@ -2779,6 +2779,22 @@ public int addIndexEngine( throw new OIndexException("Types of indexed keys have to be provided"); } + final OBinarySerializer keySerializer = determineKeySerializer(indexDefinition); + if (keySerializer == null) { + throw new OIndexException("Can not determine key serializer"); + } + + final int keySize = determineKeySize(indexDefinition); + + final boolean nullValuesSupport = !indexDefinition.isNullValuesIgnored(); + final byte serializerId; + + if (valueSerializer != null) { + serializerId = valueSerializer.getId(); + } else { + serializerId = -1; + } + checkBackupRunning(); stateLock.writeLock().lock(); try { @@ -2806,22 +2822,6 @@ public int addIndexEngine( } } - final OBinarySerializer keySerializer = determineKeySerializer(indexDefinition); - if (keySerializer == null) { - throw new OIndexException("Can not determine key serializer"); - } - - final int keySize = determineKeySize(indexDefinition); - - final boolean nullValuesSupport = !indexDefinition.isNullValuesIgnored(); - final byte serializerId; - - if (valueSerializer != null) { - serializerId = valueSerializer.getId(); - } else { - serializerId = -1; - } - final OBaseIndexEngine engine = addIndexEngineInternal( atomicOperation,