Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[CBR-454] Correct window size when streaming blocks #3679

Merged
merged 1 commit into from
Sep 28, 2018

Conversation

karknu
Copy link
Contributor

@karknu karknu commented Sep 28, 2018

Description

When a node syncs with mainnet it maintains a window which controls
how many blocks the peer it syncs with is permitted to have outstanding.
The client incorrectly increased the window which, when the server
manages to send faster than the client was able to write to disk would
lead to a very large memory consumption until all blocks where written.

Linked issue

https://iohk.myjetbrains.com/youtrack/issue/CBR-454

Type of change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • 🔨 New or improved tests for existing code
  • ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • [ x] I have read the style guide document, and my code follows the code style of this project.
  • [ ~] If my code deals with exceptions, it follows the guidelines.
  • [ ~] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
  • [~ ] CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.

QA Steps

nix-build -A acceptanceTests.mainnet.full -o acceptance-test
./acceptance-test

Screenshots (if available)

When a node syncs with mainnet it maintains a window which controls
how many blocks the peer it syncs with is permitted to have outstanding.
The client incorrectly increased the window which, when the server
manages to send faster than the client was able to write to disk, would
lead to a very large memory consumption until all blocks where written.
@karknu karknu merged commit a53bd03 into develop Sep 28, 2018
@karknu karknu deleted the karknu/cbr-454_streaming_leak branch September 28, 2018 12:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants