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

Commit

Permalink
Evict program cache using transaction usage counter (#31927)
Browse files Browse the repository at this point in the history
* Evict program cache using tx usage counter

* address review feedback

* address review feedback
  • Loading branch information
pgarg66 authored Jun 2, 2023
1 parent 4b0514d commit 37ebb70
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 138 deletions.
2 changes: 1 addition & 1 deletion program-runtime/src/invoke_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ impl<'a> InvokeContext<'a> {
_ => None,
}
.ok_or(InstructionError::UnsupportedProgramId)?;
entry.usage_counter.fetch_add(1, Ordering::Relaxed);
entry.ix_usage_counter.fetch_add(1, Ordering::Relaxed);

let program_id = *instruction_context.get_last_program_key(self.transaction_context)?;
self.transaction_context
Expand Down
Loading

0 comments on commit 37ebb70

Please sign in to comment.