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

[stable2407] Backport #6058 #6121

Conversation

paritytech-cmd-bot-polkadot-sdk[bot]

Backport #6058 into stable2407 from pkhry.

See the documentation on how to use this bot.

@paritytech-cmd-bot-polkadot-sdk
Copy link
Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-6058-to-stable2407
git worktree add --checkout .worktree/backport-6058-to-stable2407 backport-6058-to-stable2407
cd .worktree/backport-6058-to-stable2407
git reset --hard HEAD^
git cherry-pick -x a0aefc6b233ace0a82a8631d67b6854e6aeb014b
git push --force-with-lease

@github-actions github-actions bot added the A3-backport Pull request is already reviewed well in another branch. label Oct 18, 2024
Copy link

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or trivial (not sure audit).
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

closes #5871

> The chainHead_v1_follow is using unbounded channels to send out
messages on the JSON-RPC connection which may use lots of memory if the
client is slow and can't really keep up with server i.e, substrate may
keep lots of message in memory

This PR changes the outgoing stream to abort and send a `Stop` event
downstream in the case that client doesn't keep up with the producer.

*In depth notes about how this PR should be integrated by downstream
projects. This part is mandatory, and should be
reviewed by reviewers, if the PR does NOT have the `R0-Silent` label. In
case of a `R0-Silent`, it can be ignored.*

- `rpc::Subscription::pipe_from_stream` - now takes `Self` param by
reference, change was made to allow sending events to the `Subscription`
after calls to `pipe_from_stream`.
- `chainhead_follow::submit_events` - now uses `Abortable` stream to end
it early in case
     - connection was closed by the client
     - signal received that subscription should stop
     - error has occured when processing the events
     - client can't keep up with the events produced
- TODO:
  - make the abort logic less hacky

---------

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
(cherry picked from commit a0aefc6)
Signed-off-by: Pavlo Khrystenko <p.khrystenko@gmail.com>
@pkhry pkhry force-pushed the backport-6058-to-stable2407 branch from 214424e to 88258b4 Compare October 21, 2024 00:59
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 3/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7605052

@niklasad1
Copy link
Member

Not critical to backport this and since it has breaking changes let's skip it

@niklasad1 niklasad1 closed this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A3-backport Pull request is already reviewed well in another branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants