Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

test_shrink_candidate_slots uses write cache #29145

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

jeffwashington
Copy link
Contributor

Problem

migrating all tests to use write cache

Summary of Changes

Fixes #

@@ -13771,7 +13771,7 @@ pub mod tests {
fn test_shrink_candidate_slots() {
solana_logger::setup();

let accounts = AccountsDb::new_single_for_tests();
let mut accounts = AccountsDb::new_single_for_tests();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the intent to also enable the write cache here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The write cache will be enabled globally shortly. The shrink ratio parameter doesn't affect the v1 shrink code path anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha.

Does

accounts.shrink_candidate_slots();

end up calling the v1 shrink code path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

doesn't look like it. But how we create append vecs is different. Whatever the case, I updated the test to use the write cache completely. I just have to back this out once everyone can only use the write cache.

@jeffwashington jeffwashington merged commit 072070b into solana-labs:master Dec 8, 2022
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Dec 8, 2022
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Dec 9, 2022
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Dec 9, 2022
jeffwashington added a commit that referenced this pull request Dec 9, 2022
* test_shrink_candidate_slots uses write cache (#29145)

* add tests for collect_from_existing_account
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
* test_shrink_candidate_slots uses write cache (solana-labs#29145)

* add tests for collect_from_existing_account
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Jan 4, 2023
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Jan 4, 2023
* test_shrink_candidate_slots uses write cache (solana-labs#29145)

* add tests for collect_from_existing_account
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants