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

[reconciler] Skip on Live Balance Fetch Errors at Tip #216

Merged
merged 11 commits into from
Oct 30, 2020

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Oct 30, 2020

It is possible that the reconciler could query an account balance at an index not known to a Rosetta implementation if any balance queries are made before the syncer processes a node re-org. This PR ensures we treat these as "skipped" reconciliations instead of failures.

If a failure occurs because of some re-org (and we are querying balance at an index ahead of tip), we will retry the skipped reconciliation when the balance changes from the replacement blocks are added.

Changes

  • Add IndexAtTip to ReconcilerHelper
  • Skip reconciliation if balance fetch fails at tip
  • Add IndexAtTip to BlockStorage

@patrick-ogrady patrick-ogrady changed the title [reconciler] Allow Balance Fetch Errors at Tip [reconciler] Allow Live Balance Fetch Errors at Tip Oct 30, 2020
@patrick-ogrady patrick-ogrady changed the title [reconciler] Allow Live Balance Fetch Errors at Tip [reconciler] Skip on Live Balance Fetch Errors at Tip Oct 30, 2020
@patrick-ogrady patrick-ogrady changed the title [reconciler] Skip on Live Balance Fetch Errors at Tip [WIP] [reconciler] Skip on Live Balance Fetch Errors at Tip Oct 30, 2020
@coveralls
Copy link

coveralls commented Oct 30, 2020

Pull Request Test Coverage Report for Build 10459

  • 72 of 80 (90.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.09%) to 78.93%

Changes Missing Coverage Covered Lines Changed/Added Lines %
reconciler/reconciler.go 43 47 91.49%
storage/block_storage.go 29 33 87.88%
Files with Coverage Reduction New Missed Lines %
storage/block_storage.go 1 75.0%
reconciler/reconciler.go 2 83.4%
Totals Coverage Status
Change from base Build 10368: 0.09%
Covered Lines: 7215
Relevant Lines: 9141

💛 - Coveralls

@patrick-ogrady patrick-ogrady changed the title [WIP] [reconciler] Skip on Live Balance Fetch Errors at Tip [reconciler] Skip on Live Balance Fetch Errors at Tip Oct 30, 2020
arjun-io
arjun-io previously approved these changes Oct 30, 2020
Copy link

@arjun-io arjun-io left a comment

Choose a reason for hiding this comment

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

Couple of non-blocking nits

storage/block_storage.go Outdated Show resolved Hide resolved
storage/block_storage.go Outdated Show resolved Hide resolved
@patrick-ogrady patrick-ogrady merged commit e8c5df9 into master Oct 30, 2020
@patrick-ogrady patrick-ogrady deleted the patrick/allow-tip-failures branch October 30, 2020 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants