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

Improve transaction hash v2 performance (0.111) #9020

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

xin-hedera
Copy link
Collaborator

Description:

This PR backports the changes to release/0.111

  • Add a smallint distribution_id column to transaction_hash table and distribute on it in v2
  • Adjust and optimize BackfillTransactionHashMigration
  • Adjust rest api to use distribution_id to query transaction_hash in v2
  • Update v1 to v2 migration script to skip transaction_hash table

Related issue(s):

Related to #8896

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

- Add a smallint distribution_id column to transaction_hash table and distribute on it in v2
- Adjust and optimize BackfillTransactionHashMigration
- Adjust rest api to use distribution_id to query transaction_hash in v2
- Update v1 to v2 migration script to skip transaction_hash table

Signed-off-by: Xin Li <[email protected]>
@xin-hedera xin-hedera added this to the 0.111.0 milestone Aug 13, 2024
@xin-hedera xin-hedera self-assigned this Aug 13, 2024
@xin-hedera xin-hedera added bug Type: Something isn't working regression rest Area: REST API labels Aug 13, 2024
Copy link
Contributor

@jascks jascks left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@xin-hedera xin-hedera marked this pull request as ready for review August 13, 2024 20:35
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

Attention: Patch coverage is 72.97297% with 20 lines in your changes missing coverage. Please review.

Project coverage is 92.37%. Comparing base (728f311) to head (cedf77b).

Files Patch % Lines
...er/migration/BackfillTransactionHashMigration.java 71.83% 15 Missing and 5 partials ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##             release/0.111    #9020      +/-   ##
===================================================
+ Coverage            92.34%   92.37%   +0.02%     
+ Complexity            7515     6609     -906     
===================================================
  Files                  909      753     -156     
  Lines                30233    26041    -4192     
  Branches              3698     3494     -204     
===================================================
- Hits                 27920    24055    -3865     
+ Misses                1491     1271     -220     
+ Partials               822      715     -107     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xin-hedera xin-hedera merged commit bd63b31 into release/0.111 Aug 13, 2024
28 of 29 checks passed
@xin-hedera xin-hedera deleted the 8896-transaction-hash-v2-performance-111 branch August 13, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Something isn't working regression rest Area: REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants