Skip to content

Commit 8e6face

Browse files
jecsand838scovich
andauthored
Update arrow-avro/src/reader/mod.rs
Co-authored-by: Ryan Johnson <[email protected]>
1 parent ed7fb49 commit 8e6face

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arrow-avro/src/reader/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ impl Decoder {
203203
let old_decoder = std::mem::replace(&mut self.active_decoder, new_decoder);
204204
self.cache.shift_remove(&old_fingerprint);
205205
self.cache.insert(old_fingerprint, old_decoder);
206+
if self.cache.len() > self.max_cache_size {
207+
self.cache.shift_remove_index(0);
208+
}
206209
} else {
207210
self.active_decoder = new_decoder;
208211
}

0 commit comments

Comments
 (0)