Reuse native checkpoints before source length changes
This commit is contained in:
1 parent
465a574124
commit
6acd82dbfa
8 files changed
+222
-4
No files matched your search
@@ -181,6 +181,24 @@ impl Executor {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn resize_entry_statistics(
|
||||
&mut self,
|
||||
previous: usize,
|
||||
current: usize,
|
||||
replayed_entry_bytes: Option<u64>,
|
||||
) -> Option<()> {
|
||||
let events = self.events.prefix.iter_mut()
|
||||
.filter(|chunk| chunk.iter().any(|event| matches!(event, Event::Statistics(_))))
|
||||
.flat_map(|chunk| Arc::make_mut(chunk).iter_mut())
|
||||
.chain(&mut self.events.tail);
|
||||
for event in events {
|
||||
if let Event::Statistics(report) = event {
|
||||
report.resize_entry_payload(previous, current, replayed_entry_bytes)?;
|
||||
}
|
||||
}
|
||||
Some(())
|
||||
}
|
||||
|
||||
pub(super) fn equivalent_accounting_history(&self, old: &Self) -> bool {
|
||||
// These containers may reintroduce previously retained allocations
|
||||
// that are outside the accounting walk at this boundary.
|
||||
|
||||
Reference in new issue
Block a user