Closed poszu closed 3 weeks ago
Attention: Patch coverage is 81.81818%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 81.8%. Comparing base (
f5f96b9
) to head (1075dd0
). Report is 1 commits behind head on develop.
Files with missing lines | Patch % | Lines |
---|---|---|
sql/statesql/migrations/state_0021_migration.go | 75.0% | 1 Missing and 2 partials :warning: |
sql/atxs/atxs.go | 87.5% | 0 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This changes an existing migration. Does that mean all nodes running 1.7.0-alphaX
cannot be upgraded to the next 1.7.x
release because their DB migrations might fail to match the expected schema?
EDIT: nvm, I misunderstood what impact the modification would have - ignore this comment 🙂
Bors merge
Motivation
Speed up
atxs.PrevIdByNodeId
Description
The query used in
atxs.PrevIdByNodeId
became very slow in 1.7 because it joinsatxs
andposts
table to filter by the epoch from theatxs
table.Before:
I added
publish_epoch
column to theposts
table to avoid joining the two tables.After the change, the performance is equal to the original code:
The benchmark
The benchmark code is not included in the PR because there isn't the "old" implementation to compare with. Below is its code:
Test Plan
TODO