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

Speedup pending block ops int txs to fetch query #2928

Closed

Conversation

vbaranov
Copy link
Member

Motivation

Why we should merge these changes. If using GitHub keywords to close issues, this is optional as the motivation can be read on the issue page.

Changelog

Checklist for your Pull Request (PR)

pasqu4le and others added 30 commits November 28, 2019 15:58
Problem: a lot of problems are created by tracking the importing progress on multiple tables.
Querying and updating involves as such heavy operations and this is also the cause for inconsistencies.

Solution: use a new table to track the progress of block's data indexing.
By using a specific table, whose rows are deleted when there are no more pending operations on the relative block, we make joins quick and keep them to a minimum.
This is also meant to simplify all inserts and updates and only perform deletes when strictly necessary.
Problem: a lot of problems are created by tracking the importing progress on multiple tables.
Querying and updating involves as such heavy operations and this is also the cause for inconsistencies.

Solution: use a new table to track the progress of block's data indexing.
By using a specific table, whose rows are deleted when there are no more pending operations on the relative block, we make joins quick and keep them to a minimum.
This is also meant to simplify all inserts and updates and only perform deletes when strictly necessary.
@vbaranov vbaranov self-assigned this Dec 20, 2019
@vbaranov vbaranov closed this Dec 20, 2019
@coveralls
Copy link

coveralls commented Dec 20, 2019

Pull Request Test Coverage Report for Build 2603e100-217b-423b-b18f-5244280cac02

  • 112 of 126 (88.89%) changed or added relevant lines in 18 files are covered.
  • 7 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.3%) to 75.44%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/explorer/lib/explorer/chain/internal_transaction.ex 7 8 87.5%
apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex 45 48 93.75%
apps/explorer/lib/explorer/chain/pending_block_operation.ex 5 9 55.56%
apps/indexer/lib/indexer/fetcher/internal_transaction.ex 13 19 68.42%
Files with Coverage Reduction New Missed Lines %
apps/block_scout_web/lib/block_scout_web/controllers/chain/market_history_chart_controller.ex 1 78.57%
apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex 3 88.46%
apps/explorer/lib/explorer/token/instance_metadata_retriever.ex 3 46.15%
Totals Coverage Status
Change from base Build 68dc4659-f957-4226-a7f8-16be6e108d47: 0.3%
Covered Lines: 5311
Relevant Lines: 7040

💛 - Coveralls

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.

None yet

4 participants