Skip to content

Commit

Permalink
v1.18 - Adds error log for replacements in ProgramCache::assign_progr…
Browse files Browse the repository at this point in the history
…am(). (#1401)

Adds error log for replacements in ProgramCache::assign_program().
  • Loading branch information
Lichtso authored and yihau committed May 18, 2024
1 parent 130c83b commit d8e0824
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions program-runtime/src/loaded_programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,10 @@ impl<FG: ForkGraph> LoadedPrograms<FG> {
false
} else {
// Something is wrong, I can feel it ...
error!(
"ProgramCache::assign_program() failed key={:?} existing={:?} entry={:?}",
key, slot_versions, entry
);
self.stats.replacements.fetch_add(1, Ordering::Relaxed);
true
}
Expand Down Expand Up @@ -1036,6 +1040,7 @@ impl<FG: ForkGraph> LoadedPrograms<FG> {
self.stats.lost_insertions.fetch_add(1, Ordering::Relaxed);
}
let was_occupied = self.assign_program(key, loaded_program);
debug_assert!(!was_occupied, "Unexpected replacement of an entry");
self.loading_task_waiter.notify();
was_occupied
}
Expand Down
1 change: 1 addition & 0 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5144,6 +5144,7 @@ impl Bank {
));

if programs_loaded_for_tx_batch.borrow().hit_max_limit {
error!("Discarding TX batch {:#?}", batch.sanitized_transactions());
return LoadAndExecuteTransactionsOutput {
loaded_transactions: vec![],
execution_results: vec![],
Expand Down

0 comments on commit d8e0824

Please sign in to comment.