addressed code review comments
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 5adb361..ef58937 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
@@ -100,14 +100,16 @@
}
private void incrementNumActiveOperations(IModificationOperationCallback modificationCallback) {
- if (modificationCallback != null && modificationCallback != NoOpOperationCallback.INSTANCE) {
+ //modificationCallback can be NoOpOperationCallback when redo/undo operations are executed.
+ if (modificationCallback != NoOpOperationCallback.INSTANCE) {
numActiveOperations.incrementAndGet();
((AbstractOperationCallback) modificationCallback).incrementLocalNumActiveOperations();
}
}
private void decrementNumActiveOperations(IModificationOperationCallback modificationCallback) {
- if (modificationCallback != null && modificationCallback != NoOpOperationCallback.INSTANCE) {
+ //modificationCallback can be NoOpOperationCallback when redo/undo operations are executed.
+ if (modificationCallback != NoOpOperationCallback.INSTANCE) {
numActiveOperations.decrementAndGet();
((AbstractOperationCallback) modificationCallback).decrementLocalNumActiveOperations();
}