forked from dain/leveldb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes issue dain#7 "RuntimeException: Could not open table" was occur…
…ring when you run the DbBenchmark Active version objects are held in a weak hash map. Once they are no longer in the map, then their associated file are candidates to be deleted. The problem is that open Snapshots and Iterators were not holding to a reference of the Version object which they were associated with. This resulted in files associated with the version being deleted while it was still being iterated. Also added Version reference counting so that if the end user is properly closing the snapshots and iterators, then Version will be evicted from active versions map. This should allow faster reclaiming of disk space even in situations where the JVM is not eagerly GCing.
- Loading branch information
Showing
6 changed files
with
113 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters