commit | e6df8f1f78f846975339077f8eb452f46cf493b0 | [log] [tgz] |
---|---|---|
author | alexander.behm <alexander.behm@123451ca-8445-de46-9d55-352943316053> | Thu Nov 01 04:45:50 2012 +0000 |
committer | alexander.behm <alexander.behm@123451ca-8445-de46-9d55-352943316053> | Thu Nov 01 04:45:50 2012 +0000 |
tree | b0ca338bdf0e93bfcfd79cd7cfc445e64c61079d | |
parent | ded4ffe045b9a662511b6e49651ef436bec714ea [diff] |
Fixed a few remaining issues regarding closing of OS file handles. git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_lsm_tree@2419 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-am-lsm-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/rtree/impls/LSMRTreeWithAntiMatterTuples.java b/hyracks-storage-am-lsm-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/rtree/impls/LSMRTreeWithAntiMatterTuples.java index ad3bba0..d06d5ca 100644 --- a/hyracks-storage-am-lsm-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/rtree/impls/LSMRTreeWithAntiMatterTuples.java +++ b/hyracks-storage-am-lsm-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/rtree/impls/LSMRTreeWithAntiMatterTuples.java
@@ -95,6 +95,7 @@ @Override public synchronized void activate() throws HyracksDataException { super.activate(); + diskComponents.clear(); List<Object> validFileNames = fileManager.cleanupAndGetValidFiles(componentFinalizer); for (Object o : validFileNames) { String fileName = (String) o; @@ -111,7 +112,6 @@ RTree rtree = (RTree) o; rtree.deactivate(); } - diskComponents.clear(); } @Override
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/buffercache/BufferCache.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/buffercache/BufferCache.java index bd4cb6e..850162b 100644 --- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/buffercache/BufferCache.java +++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/buffercache/BufferCache.java
@@ -773,8 +773,10 @@ // Mark the fInfo as deleted, // such that when its pages are reclaimed in openFile(), // the pages are not flushed to disk but only invalidated. - ioManager.close(fInfo.getFileHandle()); - fInfo.markAsDeleted(); + if (!fInfo.fileHasBeenDeleted()) { + ioManager.close(fInfo.getFileHandle()); + fInfo.markAsDeleted(); + } } } }