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

Mitigate issues in the migration to "block_hash" indexing approach #2925

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Dec 18, 2019

Motivation

In migration to block_hash indexing approach we should clear the DB from possible inconsistencies (cc #2699 #2697 #2695)

Changelog

  1. Before constructing primary key on all tables we should check that there are no rows with empty block_hash
  2. We should check for possible duplicates of a pair [block_hash, block_index] before creating a primary key on them on internal_transactions table.
  3. Looks like, create(index(:logs, [:block_number])) index is unused in the new approach.

Checklist for your Pull Request (PR)

@vbaranov vbaranov self-assigned this Dec 18, 2019
@vbaranov vbaranov added the ready for review This PR is ready for reviews. label Dec 18, 2019
@vbaranov vbaranov force-pushed the vb-update-migration branch 2 times, most recently from 97599a1 to 37a1c37 Compare December 18, 2019 16:24
@coveralls
Copy link

coveralls commented Dec 18, 2019

Pull Request Test Coverage Report for Build ab2fa284-ea11-4e75-a99e-3b891971d843

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 75.44%

Totals Coverage Status
Change from base Build 40db3a00-b82e-4dfe-90f8-b3b8b7d7679a: 0.0%
Covered Lines: 5311
Relevant Lines: 7040

💛 - Coveralls

@vbaranov vbaranov added this to the 3.0.0 milestone Dec 18, 2019
@vbaranov vbaranov merged commit 9e5b7ce into pp-pending-blocks-ops Dec 20, 2019
@vbaranov vbaranov deleted the vb-update-migration branch December 20, 2019 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indexing ready for review This PR is ready for reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants