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

deduplicate coin history records by delta #2616

Merged
merged 5 commits into from
Aug 27, 2019

Conversation

ayrat555
Copy link
Contributor

On coin history page we show records that are found
in the db. Since we may fetch a lot of duplicated balances
for the same address if its balance is not changes for
multiple blocks.

This PR adds deduplication by delta value to remove duplication.

fixes #2565

Changelog

  • deduplicate coin history records by delta

On coin history page we show records that are found
in the db. Since we may fetch a lot of duplicated balances
for the same address if its balance is not changes for
multiple blocks.

This PR adds deduplication by delta value to remove duplication.
@coveralls
Copy link

coveralls commented Aug 23, 2019

Pull Request Test Coverage Report for Build 603c30bf-58f2-45ee-8f37-c3fbd2696725

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 78.999%

Files with Coverage Reduction New Missed Lines %
apps/indexer/lib/indexer/fetcher/internal_transaction.ex 2 60.66%
Totals Coverage Status
Change from base Build c31ac9df-9686-4cbb-86da-b46b40fe0eba: 0.2%
Covered Lines: 5195
Relevant Lines: 6576

💛 - Coveralls

Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

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

@ayrat555

Deduplication significantly slowed down coin balance history page. Please check /address/0xc8dfcec53ab1102a38e8f96be8eba37fc5340c99/coin_balances.

Screenshot 2019-08-24 at 12 48 07

We show the changes in the 3 months range on the chart. Which conditions are provided in the query to get coin balance history? Could post a link to the query here? I suppose we should get data in a query in the same range if it is not so.

@ayrat555
Copy link
Contributor Author

Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

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

Ok, it looks like it was a temporary issue. Times are comparatively equal.

@vbaranov vbaranov merged commit 99475c2 into master Aug 27, 2019
@vbaranov vbaranov deleted the ab-remove-duplicates-from-coin-history branch August 27, 2019 15:20
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.

Duplicates in coin balances records
4 participants