Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jepsen.core/run! now wraps :generator in a Forgettable reference.
We pass the test map around liberally during setup and execution, which creates lots of opportunities to retain references. If any component keeps hold of the test, it would also inadvertently retain the head of the generator--which is usually an infinite, lazy data structure. This breaking change immediately wraps the generator in a mutable Forgettable reference type (new in jepsen.util). It responds to IDeref, in case you *intend* to manipulate the generator for some reason, but is explicitly forgotten once the generator interpreter starts--allowing it to be garbage collected. The memory effects are staggering. Tests which exhausted a 16 GB heap in an hour can now run in 256 MB with almost nothing making it into oldgen.
- Loading branch information
Showing
5 changed files
with
120 additions
and
30 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