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: don't block startup on subscribe #359

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

chris13524
Copy link
Member

@chris13524 chris13524 commented Feb 12, 2024

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

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@chris13524 chris13524 self-assigned this Feb 12, 2024
.observe(&ctx, subscriber_topics_count as u64, &[]);
metrics.subscribe_latency.record(&ctx, elapsed, &[]);
} else {
info!("Renew operation already running");
Copy link
Contributor

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant hurt

Copy link
Member Author

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;
Copy link
Contributor

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?

Copy link
Member Author

@chris13524 chris13524 Feb 12, 2024

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

Copy link
Contributor

@geekbrother geekbrother left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chris13524 chris13524 merged commit 459725e into main Feb 12, 2024
13 checks passed
@chris13524 chris13524 deleted the fix/dont-block-startup-on-subscribe branch February 12, 2024 22:05
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.

3 participants