Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use LocalSlotReferences to close all hanging transaction on pool close.
Before we were using weak references and reference queue when pool was closed to cleanup all of the objects that were allocated but not yes disposed. From time to time that was not possible since we were able to observe state where WeakReference was already cleaned but not yet visible in reference queue. That would cause some of the objects (in our case transactions) to not release their resources properly. For example batch of allocated ids will never be returned and will be lost until id generator file rebuild. This PR changes that behaviour and use map of slotReferences to reliably close all entries that available in the pool. PR also makes pools AutoClosable.
- Loading branch information
1 parent
f0c8dc0
commit 81ef239
Showing
8 changed files
with
46 additions
and
69 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
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