Removed sync. block, will add another fix for issue 589.
diff --git a/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/LSMHarness.java b/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/LSMHarness.java
index e8afc3b..d30866e 100644
--- a/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/LSMHarness.java
+++ b/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/LSMHarness.java
@@ -64,21 +64,14 @@
lsmIndex.getOperationalComponents(ctx);
List<ILSMComponent> components = ctx.getComponentHolder();
try {
- // The purpose of the synchronized block is to make bumping the counter inside the op. tracker
- // and entering the mutable component an atomic operation.
- synchronized (opTracker) {
- for (ILSMComponent c : components) {
- if (!c.threadEnter(opType)) {
- break;
- }
- numEntered++;
+
+ for (ILSMComponent c : components) {
+ if (!c.threadEnter(opType)) {
+ break;
}
- entranceSuccessful = numEntered == components.size();
- if (entranceSuccessful) {
- opTracker.beforeOperation(lsmIndex, opType, ctx.getSearchOperationCallback(),
- ctx.getModificationCallback());
- }
+ numEntered++;
}
+ entranceSuccessful = numEntered == components.size();
} catch (InterruptedException e) {
entranceSuccessful = false;
throw new HyracksDataException(e);
@@ -97,6 +90,7 @@
return false;
}
}
+ opTracker.beforeOperation(lsmIndex, opType, ctx.getSearchOperationCallback(), ctx.getModificationCallback());
return true;
}