-
Notifications
You must be signed in to change notification settings - Fork 6
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: don't block startup on subscribe #359
Conversation
.observe(&ctx, subscriber_topics_count as u64, &[]); | ||
metrics.subscribe_latency.record(&ctx, elapsed, &[]); | ||
} else { | ||
info!("Renew operation already running"); |
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.
Do we really need to print this log?
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.
Cant hurt
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.
Nice to have for later debugging if necessary
.try_into() | ||
.expect("No error getting ms of elapsed time"); | ||
info!("resubscribe took {elapsed}ms"); | ||
const REQUEST_CONCURRENCY: usize = 25; |
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.
Is it ok to decrease this almost to 10 times?
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.
The variable was re-purposed. It was actually already set to 25
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.
LGTM
Description
Removes the blocking subscribe from startup. Because we've switched to webhooks, we do not need to associate the subscription with the websocket, and the relay will remember the subscription for 30 days. We still need to renew, so that async job is still there. This will be improved with #325
Improving startup time allows the service to start, which apparently it isn't starting anymore due to the length of time it takes to subscribe being longer than the healthcheck allowance: https://walletconnect.slack.com/archives/C058RS0MH38/p1707770358630189?thread_ts=1707766935.771459&cid=C058RS0MH38
How Has This Been Tested?
Not tested
Due Diligence