@@ -83,27 +83,27 @@ fn read_samples(
8383) -> Result < ( ) , mxl:: Error > {
8484 let flow_id = flow_info. common_flow_info ( ) . id ( ) . to_string ( ) ;
8585 let sample_rate = flow_info. continuous_flow_info ( ) ?. sampleRate ;
86- let continous_flow_info = flow_info. continuous_flow_info ( ) ? ;
86+ let common_flow_info = flow_info. common_flow_info ( ) ;
8787 let batch_size = if let Some ( batch_size) = batch_size {
88- if continous_flow_info . commitBatchSize != 0
89- && batch_size != continous_flow_info . commitBatchSize as u64
88+ if common_flow_info . max_commit_batch_size_hint ( ) != 0
89+ && batch_size != common_flow_info . max_commit_batch_size_hint ( ) as u64
9090 {
9191 warn ! (
9292 "Writer batch size is set to {}, but sample batch size is provided, using the \
93- latter.",
94- continous_flow_info . commitBatchSize
93+ latter.",
94+ common_flow_info . max_commit_batch_size_hint ( )
9595 ) ;
9696 }
9797 batch_size as usize
98- } else if continous_flow_info . commitBatchSize == 0 {
98+ } else if common_flow_info . max_commit_batch_size_hint ( ) == 0 {
9999 let batch_size = ( sample_rate. numerator / ( 100 * sample_rate. denominator ) ) as usize ;
100100 warn ! (
101101 "Writer batch size not available, using fallback value of {}." ,
102102 batch_size
103103 ) ;
104104 batch_size
105105 } else {
106- continous_flow_info . commitBatchSize as usize
106+ common_flow_info . max_commit_batch_size_hint ( ) as usize
107107 } ;
108108 let mut read_head = reader. get_info ( ) ?. continuous_flow_info ( ) ?. headIndex ;
109109 let mut read_head_valid_at = mxl_instance. get_time ( ) ;
0 commit comments