Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Fixing missing pubsub notification for programSubscribe and logsSubscribe (backport #19092) #19455

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 26, 2021

This is an automatic backport of pull request #19092 done by Mergify.
Cherry-pick of 1a372a7 has failed:

On branch mergify/bp/v1.6/pr-19092
Your branch is up to date with 'origin/v1.6'.

You are currently cherry-picking commit 1a372a792.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   core/src/rpc.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   core/src/optimistically_confirmed_bank_tracker.rs
	both modified:   core/src/rpc_subscriptions.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

…ribe (#19092)

#18587: programSubscribe is missing notifications randomly. The issue is because of two reasons

Not all rooted slots get OptimisticallyConfirmed notifications
The OptimisticallyConfirmed notifications can be out of order for slots: slot A and B with A < B can see notification for B first before A.
Summary of Changes

Changed OptimisticallyConfirmedBankTracker to send notifications for parent banks if they have not been notified yet. We use a new variable last_notified_slot to track that.

Tests:
With my validator running against testnet, before the fix, it was failing 75% of time, with the fix, it is passing consistently. Using the program mentioned in #18587.

(cherry picked from commit 1a372a7)

# Conflicts:
#	core/src/optimistically_confirmed_bank_tracker.rs
#	core/src/rpc_subscriptions.rs
@mergify mergify bot added conflicts automerge Merge this Pull Request automatically once CI passes and removed automerge Merge this Pull Request automatically once CI passes labels Aug 26, 2021
@mergify
Copy link
Contributor Author

mergify bot commented Aug 26, 2021

automerge label removed due to a CI failure

@CriesofCarrots
Copy link
Contributor

CriesofCarrots commented Aug 26, 2021

Part of pubsub optimizations

@mergify mergify bot added the automerge Merge this Pull Request automatically once CI passes label Aug 26, 2021
@codecov
Copy link

codecov bot commented Aug 27, 2021

Codecov Report

Merging #19455 (58361c2) into v1.6 (715c5e6) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff            @@
##             v1.6   #19455    +/-   ##
========================================
  Coverage    82.3%    82.3%            
========================================
  Files         423      423            
  Lines      118213   118479   +266     
========================================
+ Hits        97315    97570   +255     
- Misses      20898    20909    +11     

@mergify mergify bot merged commit e0584b7 into v1.6 Aug 27, 2021
@mvines mvines deleted the mergify/bp/v1.6/pr-19092 branch December 11, 2021 05:54
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2022

This PR has been automatically locked since there has not been any activity in past 14 days after it was merged.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes conflicts locked PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants