-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work around a strange space leak in PBFT.ChainState #1357
Conversation
56f0cc4
to
2b369b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. Very minor comments.
ouroboros-consensus/src/Ouroboros/Storage/ImmutableDB/Impl/Iterator.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Storage/ImmutableDB/Impl/Iterator.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Storage/ImmutableDB/Impl/Iterator.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Storage/ImmutableDB/Impl/Iterator.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Storage/ImmutableDB/Impl/Iterator.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Storage/ImmutableDB/Impl/Iterator.hs
Outdated
Show resolved
Hide resolved
Stop-gap solution for #1356.
2b369b5
to
dc99794
Compare
bors r+ |
1357: Work around a strange space leak in PBFT.ChainState r=mrBliss a=mrBliss Includes a workaround for #1356. Additionally, squash all thunks introduced in the last month(s), so that the tests pass again when the `checktvarinvariant` flag is enabled for the `io-sim-classes` package. This boils down to replacing tuples with records with strict fields and forcing the elements of non-empty list to WHNF. Co-authored-by: Thomas Winant <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
We need a nightly run with the whnf checks enabled.
|
Haha. That flag should sound an alarm if not used with a reasonable
combination of `-dsuppress-*`.
…On Mon, Dec 16, 2019 at 7:27 AM mrBliss ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In ouroboros-consensus/src/Ouroboros/Consensus/Protocol/PBFT/ChainState.hs
<#1357 (comment)>
:
> PBftChainState {
preAnchor = preAnchor'
, postAnchor = postAnchor'
, preWindow = preWindow'
, inWindow = inWindow'
, counts = updateCounts counts
- , ebbs = ebbs -- NB this needs to be pruned
+ -- NOTE: 'pruneEBBsLT' is inlined here to avoid a strange space leak
+ -- that also goes away with @-O0@, see IntersectMBO/ouroboros-consensus#741.
+ , ebbs = EbbMap $ Map.filter (>= anchorSlot') (unEbbMap ebbs)
Noted! I had a look this morning, but the GHC Core (-ddump-simpl) version
of append was ~1400 lines, so I quickly gave up 😅
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#1357>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIOBU6MYOFFSD4SQIHHHWLQY6M65ANCNFSM4J3KHRJA>
.
|
Great work! |
After #1360 😁 |
Includes a workaround for IntersectMBO/ouroboros-consensus#741.
Additionally, squash all thunks introduced in the last month(s), so that the tests pass again when the
checktvarinvariant
flag is enabled for theio-sim-classes
package. This boils down to replacing tuples with records with strict fields and forcing the elements of non-empty list to WHNF.