Skip to content
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

fix: fix inflight block potential memory bloat issues #3094

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

driftluo
Copy link
Collaborator

What problem does this PR solve?

compact_reconstruct_inflight only clear by prune on remote peer doesn't respond to the GetBlockTransactions requests, In most cases, the cleanup conditions are not established, which will cause memory bloat.

This PR modified the internal implementation of the cleanup and added the corresponding test

Check List

Tests

  • Unit test

Release note

Title Only: Include only the PR title in the release note.

@driftluo driftluo requested a review from a team as a code owner October 14, 2021 08:25
sync/src/types/mod.rs Outdated Show resolved Hide resolved
sync/src/types/mod.rs Outdated Show resolved Hide resolved
@keroro520
Copy link
Contributor

bors r=quake,keroro520

bors bot added a commit that referenced this pull request Oct 19, 2021
3094: fix: fix inflight block potential memory bloat issues r=quake,keroro520 a=driftluo

### What problem does this PR solve?

`compact_reconstruct_inflight` only clear by `prune` on remote peer doesn't respond to the `GetBlockTransactions` requests, In most cases, the cleanup conditions are not established, which will cause memory bloat.

This PR modified the internal implementation of the cleanup and added the corresponding test 

### Check List

Tests

- Unit test

### Release note

```release-note
Title Only: Include only the PR title in the release note.
```



Co-authored-by: driftluo <driftluo@foxmail.com>
@bors
Copy link
Contributor

bors bot commented Oct 19, 2021

Build failed:

@driftluo
Copy link
Collaborator Author

bors r=quake,keroro520

@bors bors bot merged commit 92f1d8f into nervosnetwork:develop Oct 19, 2021
@driftluo driftluo deleted the fix-inflight-block branch October 19, 2021 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants