Skip to content

Commit

Permalink
fix: add check to avoid to try locking not existing ridbags
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Sep 19, 2023
1 parent 7354684 commit ca4067a
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6339,15 +6339,17 @@ private void lockRidBags(
for (final Map.Entry<String, OTransactionIndexChanges> entry : indexes.entrySet()) {
final String indexName = entry.getKey();
final OIndexInternal index = entry.getValue().resolveAssociatedIndex(indexName, manager, db);
try {
OBaseIndexEngine engine = getIndexEngine(index.getIndexId());
if (index != null) {
try {
OBaseIndexEngine engine = getIndexEngine(index.getIndexId());

if (!index.isUnique() && engine.hasRidBagTreesSupport()) {
atomicOperationsManager.acquireExclusiveLockTillOperationComplete(
atomicOperation, OIndexRIDContainerSBTree.generateLockName(indexName));
if (!index.isUnique() && engine.hasRidBagTreesSupport()) {
atomicOperationsManager.acquireExclusiveLockTillOperationComplete(
atomicOperation, OIndexRIDContainerSBTree.generateLockName(indexName));
}
} catch (OInvalidIndexEngineIdException e) {
throw logAndPrepareForRethrow(e, false);
}
} catch (OInvalidIndexEngineIdException e) {
throw logAndPrepareForRethrow(e, false);
}
}
}
Expand Down

0 comments on commit ca4067a

Please sign in to comment.