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

Replaces ReadAccountMapEntry in accounts index #35239

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

brooksprumo
Copy link
Contributor

@brooksprumo brooksprumo commented Feb 19, 2024

Problem

See #34786 for background.

We want to limit the use of ReadAccountMapEntry, from AccountsIndex, everywhere. Ultimately removing it once there are no more uses.

Tests in Accounts Index use ReadAccountMapEntry via get_account_read_entry() to assert expectations of slot lists and ref counts. They can be rewritten to not need ReadAccountMapEntry though.

Summary of Changes

Replaces get_account_read_entry() in accounts index

@brooksprumo brooksprumo added the work in progress This isn't quite right yet label Feb 19, 2024
@brooksprumo brooksprumo self-assigned this Feb 19, 2024
@brooksprumo brooksprumo removed the work in progress This isn't quite right yet label Feb 19, 2024
@brooksprumo brooksprumo changed the title Replaces get_account_read_entry() in accounts index Replaces ReadAccountMapEntry in accounts index Feb 19, 2024

let entry = if *lock {
index
.get_account_read_entry_with_lock(&key, read_lock.as_ref().unwrap())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the last use of get_account_read_entry_with_lock(). It will be removed in #35240.

@brooksprumo brooksprumo marked this pull request as ready for review February 19, 2024 16:30
Copy link
Contributor

@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 ce72c22 into solana-labs:master Feb 20, 2024
36 checks passed
@brooksprumo brooksprumo deleted the self-ref/3/index/1 branch February 20, 2024 18:51
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.

2 participants