/// Reconciles ingester state (ingester_partitions) and catalog state (parquet_files and
/// tombstones), producing a list of chunks to query
Reconciles ingester state (ingester_partitions) and catalog state (parquet_files and
tombstones), producing a list of chunks to query
Reconciles ingester state ( ingester_partitions ) and catalog state ( parquet_files and tombstones ) producing a list of chunks to query
pub(crate) async fn reconcile(
        &self,
        ingester_partitions: Vec<IngesterPartition>,
        tombstones: Vec<Arc<Tombstone>>,
        parquet_files: Arc<CachedParquetFiles>,
    ) -> Result<Vec<Arc<dyn QueryChunk>>, ReconcileError> {
        let mut chunks = self
            .build_chunks_from_parquet(&ingester_partitions, tombstones, parquet_files)
            .await?;
        chunks.extend(self.build_ingester_chunks(ingester_partitions));
        debug!(num_chunks=%chunks.len(), "Final chunk count after reconcilation");
        let chunks = self.sync_partition_sort_keys(chunks).await;
        let chunks: Vec<Arc<dyn QueryChunk>> = chunks
            .into_iter()
            .map(|c| c.upcast_to_querier_chunk().into())
            .collect();
        Ok(chunks)
    }
pub ( crate ) async fn reconcile ( & self , ingester_partitions : Vec < IngesterPartition > , tombstones : Vec < Arc < Tombstone > > , parquet_files : Arc < CachedParquetFiles > , ) -> Result < Vec < Arc < dyn QueryChunk > > , ReconcileError > { let mut chunks = self . build_chunks_from_parquet ( & ingester_partitions , tombstones , parquet_files ) . await ? ; chunks . extend ( self . build_ingester_chunks ( ingester_partitions ) ) ; debug ! ( num_chunks chunks len ( ) " " ) ; let chunks = self . sync_partition_sort_keys ( chunks ) . await ; let chunks : Vec < Arc < dyn QueryChunk > > = chunks . into_iter ( ) . map ( | c | c . upcast_to_querier_chunk ( ) . into ( ) ) . collect ( ) ; Ok ( chunks ) }
Reconciles ingester state (ingester_partitions) and catalog state (parquet_files and
tombstones), producing a list of chunks to query
Reconciles ingester state ( ingester_partitions ) and catalog state ( parquet_files and tombstones ) producing a list of chunks to query
&self
ingester_partitions
Vec<IngesterPartition>
tombstones
Vec<Arc<Tombstone>>
parquet_files
Arc<CachedParquetFiles>