-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
RPC Notifier Signal when Setup Complete #27481
Conversation
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.
rpc_subscriptions::tests::test_check_account_subscribe has a same problem in my branch. After I patch this commit, it seems okay.
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.
Thanks for reworking this! lgtm if CI is happy
Thanks for your help! |
just noticed there is a similar error on v1.11 https://buildkite.com/solana-labs/solana/builds/81131#0182fea8-6a0c-47d9-8dd2-2f8eb55dc509 |
Since this is in essence a test-only change, backporting seems reasonable. |
* RPC notifier signal when ready (cherry picked from commit 242c9cb)
* RPC notifier signal when ready (cherry picked from commit 242c9cb)
@@ -722,6 +722,7 @@ impl Validator { | |||
block_commitment_cache.clone(), | |||
optimistically_confirmed_bank.clone(), | |||
&config.pubsub_config, | |||
None, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -640,6 +656,9 @@ impl RpcSubscriptions { | |||
.build() | |||
.unwrap(); | |||
pool.install(|| { | |||
if let Some(rpc_notifier_ready) = rpc_notifier_ready { | |||
rpc_notifier_ready.fetch_or(true, Ordering::Relaxed); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -640,6 +656,9 @@ impl RpcSubscriptions { | |||
.build() | |||
.unwrap(); | |||
pool.install(|| { | |||
if let Some(rpc_notifier_ready) = rpc_notifier_ready { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Problem
See #27480. CI test flakiness
Summary of Changes
have
new_with_config
optionally signal back to callers when RPC Notifier thread pool routine has been installed. Have tests wait for setup to complete before proceeding with next steps.Have
new_for_tests
callnew_for_tests_with_blockstore
to reduce redundant code