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

Cleanup - program runtime #34318

Merged
merged 8 commits into from
Dec 6, 2023
Merged

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Dec 5, 2023

The program runtime crate was reviewed, this PR addresses the informational points.

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Merging #34318 (04af227) into master (d451675) will decrease coverage by 0.1%.
Report is 15 commits behind head on master.
The diff coverage is 60.0%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34318     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         819      819             
  Lines      220228   220219      -9     
=========================================
- Hits       180535   180521     -14     
- Misses      39693    39698      +5     

seanyoung
seanyoung previously approved these changes Dec 5, 2023
Comment on lines 652 to 656
*second_level = second_level
.iter()
.filter(|entry| entry.deployment_slot != slot)
.cloned()
.collect();
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like a open-coded vec retain, i.e. could be second_level.retain(|entry| entry.deployment_slot != slot);

@Lichtso Lichtso merged commit cf0c52c into solana-labs:master Dec 6, 2023
33 checks passed
@Lichtso Lichtso deleted the cleanup/program-runtime branch December 6, 2023 21:05
@Lichtso Lichtso added the v1.17 PRs that should be backported to v1.17 label Dec 12, 2023
Copy link
Contributor

mergify bot commented Dec 12, 2023

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

mergify bot pushed a commit that referenced this pull request Dec 12, 2023
* Removes retain() from prune_by_deployment_slot() as that is covered in remove_programs_with_no_entries() already.

* Removes remove_programs_with_no_entries() from sort_and_unload().

* Fixes ix_usage_counter in LoadedProgram::to_unloaded().

* Fixes doc comment of LoadedProgram::ix_usage_counter.

* Removes unused num_total_programs from test_eviction().

* Replaces .as_ref() in lambda with std::option::Option::as_ref.

* Replaces .for_each() with a for-loop.

* Uses .retain() instead of iter().filter().cloned().collect().

(cherry picked from commit cf0c52c)
Lichtso added a commit that referenced this pull request Dec 12, 2023
Cleanup - program runtime (#34318)

* Removes retain() from prune_by_deployment_slot() as that is covered in remove_programs_with_no_entries() already.

* Removes remove_programs_with_no_entries() from sort_and_unload().

* Fixes ix_usage_counter in LoadedProgram::to_unloaded().

* Fixes doc comment of LoadedProgram::ix_usage_counter.

* Removes unused num_total_programs from test_eviction().

* Replaces .as_ref() in lambda with std::option::Option::as_ref.

* Replaces .for_each() with a for-loop.

* Uses .retain() instead of iter().filter().cloned().collect().

(cherry picked from commit cf0c52c)

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.17 PRs that should be backported to v1.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants