fix for issue 594.
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java
index ad363f3..3347fcc 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java
@@ -48,7 +48,9 @@
public synchronized void beforeOperation(ILSMIndex index, LSMOperationType opType,
ISearchOperationCallback searchCallback, IModificationOperationCallback modificationCallback)
throws HyracksDataException {
- numActiveOperations++;
+ if (opType == LSMOperationType.MODIFICATION || opType == LSMOperationType.FORCE_MODIFICATION) {
+ numActiveOperations++;
+ }
}
@Override
@@ -66,7 +68,10 @@
IModificationOperationCallback modificationCallback) throws HyracksDataException {
int nActiveOps;
synchronized (this) {
- nActiveOps = numActiveOperations--;
+ if (opType == LSMOperationType.MODIFICATION || opType == LSMOperationType.FORCE_MODIFICATION) {
+ numActiveOperations--;
+ }
+ nActiveOps = numActiveOperations;
}
if (opType != LSMOperationType.FLUSH) {
flushIfFull(nActiveOps);