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

Retain usage counter on program upgrade #31142

Merged
merged 3 commits into from
Apr 11, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Apr 11, 2023

Problem

The usage count for the program resets when the program is upgraded. This could lead to unnecessary eviction of frequently used program on their upgrade.

Summary of Changes

Copy over the usage count to the upgraded program.

Fixes #

@pgarg66 pgarg66 requested a review from Lichtso April 11, 2023 13:46
@pgarg66 pgarg66 requested a review from Lichtso April 11, 2023 13:59
@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Merging #31142 (3a66210) into master (12e3e8b) will decrease coverage by 0.1%.
The diff coverage is 96.4%.

@@            Coverage Diff            @@
##           master   #31142     +/-   ##
=========================================
- Coverage    81.5%    81.5%   -0.1%     
=========================================
  Files         728      728             
  Lines      206100   206152     +52     
=========================================
+ Hits       168098   168121     +23     
- Misses      38002    38031     +29     

@pgarg66 pgarg66 merged commit fb6e02c into solana-labs:master Apr 11, 2023
@pgarg66 pgarg66 deleted the retain-usage-count branch April 11, 2023 16:43
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Apr 14, 2023
* Retain usage counter on program upgrade

* cleanup as per feedback

* fix clippy
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.

None yet

2 participants