Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Nov 18, 2023
1 parent 6c40d8a commit 8dd45a0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5078,7 +5078,6 @@ impl Bank {
// Lock the global cache again to replenish the missing programs
if !missing_programs.is_empty() || !unloaded_programs.is_empty() {
let mut loaded_programs_cache = self.loaded_programs_cache.write().unwrap();
info!("write lock 1");
for (key, program) in missing_programs {
let (_was_occupied, entry) = loaded_programs_cache.replenish(key, program);
// Use the returned entry as that might have been deduplicated globally
Expand Down Expand Up @@ -5264,7 +5263,6 @@ impl Bank {

use rand::Rng;
if rand::thread_rng().gen_range(0..1000) == 0 {
info!("write lock 3");
const SHRINK_LOADED_PROGRAMS_TO_PERCENTAGE: u8 = 90;
self.loaded_programs_cache
.write()
Expand Down Expand Up @@ -5631,7 +5629,6 @@ impl Bank {
if !programs_modified_by_tx.is_empty()
|| !programs_updated_only_for_global_cache.is_empty()
{
info!("write lock2");
let mut cache = self.loaded_programs_cache.write().unwrap();
cache.merge(programs_modified_by_tx);
cache.merge(programs_updated_only_for_global_cache);
Expand Down

0 comments on commit 8dd45a0

Please sign in to comment.