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

allow index update to change storage slot # #23311

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Feb 23, 2022

Problem

this is used by ancient append vecs. Broken out here because of all the files and tests it touches.

Summary of Changes

Fixes #

@jeffwashington jeffwashington changed the title Feb2 with trait allow index update to change storage slot # Feb 24, 2022
@jeffwashington jeffwashington force-pushed the feb2_with_trait branch 8 times, most recently from 94636a6 to 4bda786 Compare February 28, 2022 05:09
Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

I think this looks good. It's hard for me to think about all the cases here, esp with add/deref. So like the comments below, maybe more tests/debug asserts would be valuable (if possible)?

Or maybe there's a way to refactor/simplify the loop in update_slot_list()? It feels like there's some code duplication (but maybe not enough?).

Probably just getting lots of runtime on this is good.

runtime/src/in_mem_accounts_index.rs Show resolved Hide resolved
runtime/src/in_mem_accounts_index.rs Show resolved Hide resolved
@jeffwashington jeffwashington force-pushed the feb2_with_trait branch 4 times, most recently from 867f4c7 to cb06e8c Compare February 28, 2022 17:47
Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

I think this new impl looks good too. I think the for loop is simpler as well.

runtime/src/in_mem_accounts_index.rs Outdated Show resolved Hide resolved
runtime/src/in_mem_accounts_index.rs Outdated Show resolved Hide resolved
runtime/src/in_mem_accounts_index.rs Outdated Show resolved Hide resolved
@jeffwashington jeffwashington force-pushed the feb2_with_trait branch 2 times, most recently from 90c7bf5 to 41d629d Compare February 28, 2022 21:38
@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #23311 (99412d6) into master (8184f75) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff            @@
##           master   #23311    +/-   ##
========================================
  Coverage    81.3%    81.4%            
========================================
  Files         573      573            
  Lines      156513   156610    +97     
========================================
+ Hits       127383   127579   +196     
+ Misses      29130    29031    -99     

@jeffwashington jeffwashington force-pushed the feb2_with_trait branch 2 times, most recently from 3e12b5a to 8c08a09 Compare March 2, 2022 14:32
@jeffwashington jeffwashington marked this pull request as ready for review March 2, 2022 18:05
@jeffwashington
Copy link
Contributor Author

Added some more tests. Verified snapshot startup time does not appear to be significantly impacted. Seems to be within the noise.

brooksprumo
brooksprumo previously approved these changes Mar 2, 2022
Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

I think this looks good. I didn't follow all of the new test, though. Do you want me to spend more time on it? If yes, would you be willing to help me (jump on a call maybe)?

runtime/src/in_mem_accounts_index.rs Outdated Show resolved Hide resolved
@mergify mergify bot dismissed brooksprumo’s stale review March 2, 2022 19:47

Pull request has been modified.

Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

lgtm

@jeffwashington jeffwashington merged commit a99fd09 into solana-labs:master Mar 3, 2022
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Mar 4, 2022
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.

2 participants