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

use seqlock for AccountStorage count and status tracking #34356

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

HaoranYi
Copy link
Contributor

@HaoranYi HaoranYi commented Dec 7, 2023

Problem

count_and_status are a tuple, which implement Copy traits. This make it
a good candiate to use light-weight SeqLock instead of RwLock.

similar to #33696

Summary of Changes

Use seqlock for count and status for AccountStorageEntry tracking.

Fixes #

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Merging #34356 (ea92201) into master (fa25176) will increase coverage by 0.0%.
Report is 14 commits behind head on master.
The diff coverage is 86.6%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34356   +/-   ##
=======================================
  Coverage    81.9%    81.9%           
=======================================
  Files         819      819           
  Lines      220422   220422           
=======================================
+ Hits       180673   180699   +26     
+ Misses      39749    39723   -26     

@HaoranYi HaoranYi changed the title use seqlock for appendvec count and status tracking use seqlock for AccountStorage count and status tracking Dec 7, 2023
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.

Looks good to me. I looked through the code at all the places that use count_and_status to see if there's anything going on that may've been fishy and required an RwLock. It all looked clear to me.

Good find!

@HaoranYi HaoranYi merged commit c43edd2 into solana-labs:master Dec 8, 2023
19 checks passed
@HaoranYi HaoranYi deleted the 2023_12_07 branch December 8, 2023 14:50
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