// Return true if the given tombstones is fully processed
Return true if the given tombstones is fully processed
Return true if the given tombstones is fully processed
async fn fully_processed(&self, tombstone: Tombstone) -> bool {
        let mut repos = self.catalog.repositories().await;
        // Get number of non-deleted parquet files of the same tableId & sequencerId that overlap with the tombstone time range
        let count_pf = repos
            .parquet_files()
            .count_by_overlaps(
                tombstone.table_id,
                tombstone.sequencer_id,
                tombstone.min_time,
                tombstone.max_time,
                tombstone.sequence_number,
            )
            .await;
        let count_pf = match count_pf {
            Ok(count_pf) => count_pf,
            _ => {
                warn!(
                    "Error getting parquet file count for table ID {}, sequencer ID {}, min time {:?}, max time {:?}.
                    Won't be able to verify whether its tombstone is fully processed",
                    tombstone.table_id, tombstone.sequencer_id, tombstone.min_time, tombstone.max_time
                );
                return false;
            }
        };
        // Get number of the processed parquet file for this tombstones
        let count_pt = repos
            .processed_tombstones()
            .count_by_tombstone_id(tombstone.id)
            .await;
        let count_pt = match count_pt {
            Ok(count_pt) => count_pt,
            _ => {
                warn!(
                    "Error getting processed tombstone count for tombstone ID {}.
                    Won't be able to verify whether the tombstone is fully processed",
                    tombstone.id
                );
                return false;
            }
        };
        // Fully processed if two count the same
        count_pf == count_pt
    }
async fn fully_processed ( & self , tombstone : Tombstone ) -> bool { let mut repos = self . catalog . repositories ( ) . await ; // Get number of non-deleted parquet files of the same tableId & sequencerId that overlap with the tombstone time range let count_pf = repos . parquet_files ( ) . count_by_overlaps ( tombstone . table_id , tombstone . sequencer_id , tombstone . min_time , tombstone . max_time , tombstone . sequence_number , ) . await ; let count_pf = match count_pf { Ok ( count_pf ) => count_pf , _ => { warn ! ( " " tombstone table_id tombstone sequencer_id tombstone min_time tombstone max_time ) ; return false ; } } ; // Get number of the processed parquet file for this tombstones let count_pt = repos . processed_tombstones ( ) . count_by_tombstone_id ( tombstone . id ) . await ; let count_pt = match count_pt { Ok ( count_pt ) => count_pt , _ => { warn ! ( " " tombstone id ) ; return false ; } } ; // Fully processed if two count the same count_pf == count_pt }
Return true if the given tombstones is fully processed
Return true if the given tombstones is fully processed
&self
tombstone
Tombstone