Skip to content

Commit

Permalink
Release memory used for historical items (MystenLabs#2954)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Logan <[email protected]>
  • Loading branch information
mystenmark and mlogan authored Jul 4, 2022
1 parent a48a380 commit a1125db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/sui-core/src/authority_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ impl crate::authority::AuthorityState {

Some((Ok(BatchInfoResponseItem(item)), local_state))
} else {
// Release memory now that the historical items have been processed.
local_state.items = VecDeque::new();

// When there are no more historical items, maybe subscribe
if !local_state.should_subscribe {
None
Expand Down

0 comments on commit a1125db

Please sign in to comment.