/// Check if the given chunk should be closed based on the the MutableBuffer size threshold.
Check if the given chunk should be closed based on the the MutableBuffer size threshold.
Check if the given chunk should be closed based on the the MutableBuffer size threshold .
fn check_chunk_closed(chunk: &mut CatalogChunk, mutable_size_threshold: Option<NonZeroUsize>) {
    if let Some(threshold) = mutable_size_threshold {
        if let Ok(mb_chunk) = chunk.mutable_buffer() {
            let size = mb_chunk.size();
            if size > threshold.get() {
                chunk.freeze().expect("cannot close open chunk");
            }
        }
    }
}
fn check_chunk_closed ( chunk : & mut CatalogChunk , mutable_size_threshold : Option < NonZeroUsize > ) { if let Some ( threshold ) = mutable_size_threshold { if let Ok ( mb_chunk ) = chunk . mutable_buffer ( ) { let size = mb_chunk . size ( ) ; if size > threshold . get ( ) { chunk . freeze ( ) . expect ( " " ) ; } } } }
Check if the given chunk should be closed based on the the MutableBuffer size threshold.
Check if the given chunk should be closed based on the the MutableBuffer size threshold .
chunk
&mut CatalogChunk
mutable_size_threshold
Option<NonZeroUsize>