Decrement Large Pages When Releasing From VBC

Change-Id: Ic61951fdc48f501d8b006f89f5d77791cd072ae3
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1610
Reviewed-by: Ian Maxon <imaxon@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/VirtualBufferCache.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/VirtualBufferCache.java
index fce0b74..27d879c 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/VirtualBufferCache.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/VirtualBufferCache.java
@@ -105,6 +105,9 @@
                 VirtualPage curr = bucket.cachedPage;
                 while (curr != null) {
                     if (BufferedFileHandle.getFileId(curr.dpid()) == fileId) {
+                        if (curr.getFrameSizeMultiplier() > 1) {
+                            largePages.getAndAdd(-curr.getFrameSizeMultiplier());
+                        }
                         if (prev == null) {
                             bucket.cachedPage = curr.next();
                             curr.reset();