Skip to content

Uses scan_accounts() while generating the secondary indexes#5779

Merged
brooksprumo merged 1 commit into
anza-xyz:masterfrom
brooksprumo:secondary-index/scan-accounts
Apr 14, 2025
Merged

Uses scan_accounts() while generating the secondary indexes#5779
brooksprumo merged 1 commit into
anza-xyz:masterfrom
brooksprumo:secondary-index/scan-accounts

Conversation

@brooksprumo
Copy link
Copy Markdown

@brooksprumo brooksprumo commented Apr 11, 2025

Problem

When generating secondary account indexes, we scan storages and pass each account to update_secondary_indexes(). This function needs a pubkey and a ReadableAccount per account in the storage, but currently we load/pass around the whole StoredAccountMeta. This struct should be avoided when possible, as it contains AppendVec file format implementation details. And since we don't need any of those file format details, we should use a different function for scanning the storages.

Summary of Changes

Uses scan_accounts() while generating the secondary indexes.

@brooksprumo brooksprumo self-assigned this Apr 11, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.9%. Comparing base (679ad80) to head (4dea142).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #5779     +/-   ##
=========================================
- Coverage    83.0%    82.9%   -0.1%     
=========================================
  Files         826      826             
  Lines      375839   375836      -3     
=========================================
- Hits       311955   311890     -65     
- Misses      63884    63946     +62     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brooksprumo brooksprumo force-pushed the secondary-index/scan-accounts branch from af9cfe4 to 4dea142 Compare April 14, 2025 13:24
@brooksprumo brooksprumo marked this pull request as ready for review April 14, 2025 13:53
@brooksprumo brooksprumo requested a review from HaoranYi April 14, 2025 13:53
Copy link
Copy Markdown

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

lgtm.

@brooksprumo brooksprumo merged commit 2d184bc into anza-xyz:master Apr 14, 2025
30 checks passed
@brooksprumo brooksprumo deleted the secondary-index/scan-accounts branch April 14, 2025 14:37
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.

3 participants