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

Better solution for indexer's health check and user warning #699

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

Viterbo
Copy link
Collaborator

@Viterbo Viterbo commented Nov 29, 2023

Fixes #697

Description

We are making decisions based on the indexer's health and there are cases where those decisions are made before the indexer is consulted. So we may end up making a bad decision based on the wrong data.

To avoid this problem I added an observable variable to indicate if the indexer was already consulted in such a way that any local query about the health state will always run after the indexer is consulted at least once.

Test scenarios

Reproduce the steps described in the issue #697
You will not get the indexer's health warning sign on Mainnet

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have cleaned up the code in the areas my change touches
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have removed any unnecessary console messages
  • I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
  • I have tested for mobile functionality and responsiveness
  • I have added appropriate test coverage

@Viterbo Viterbo self-assigned this Nov 29, 2023
@Viterbo Viterbo linked an issue Nov 29, 2023 that may be closed by this pull request
Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for wallet-develop-mainnet ready!

Name Link
🔨 Latest commit 2b3b7da
🔍 Latest deploy log https://app.netlify.com/sites/wallet-develop-mainnet/deploys/65673645a92d040008120cf7
😎 Deploy Preview https://deploy-preview-699--wallet-develop-mainnet.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for wallet-staging ready!

Name Link
🔨 Latest commit 2b3b7da
🔍 Latest deploy log https://app.netlify.com/sites/wallet-staging/deploys/6567364552a69a0008f56ba2
😎 Deploy Preview https://deploy-preview-699--wallet-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@donnyquixotic donnyquixotic merged commit 14d5e0d into develop Nov 29, 2023
9 checks passed
@donnyquixotic donnyquixotic deleted the 697-fix-indexer-health-check-race-condition branch November 29, 2023 19:51
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.

fix indexer health check race condition
2 participants