fn insert(&mut self, region_id: u64, start_key: &[u8], end_key: &[u8], stale_sequence: u64) {
        if !self.find_overlap_ranges(&start_key, &end_key).is_empty() {
            panic!(
                "[region {}] register deleting data in [{}, {}) failed due to overlap",
                region_id,
                hex::encode_upper(&start_key),
                hex::encode_upper(&end_key),
            );
        }
        let info = StalePeerInfo {
            region_id,
            end_key: end_key.to_owned(),
            stale_sequence,
        };
        self.ranges.insert(start_key.to_owned(), info);
    }
/// Inserts a new range waiting to be deleted.
///
/// Before an insert is called, it must call drain_overlap_ranges to clean the overlapping range.
Inserts a new range waiting to be deleted.
Before an insert is called, it must call drain_overlap_ranges to clean the overlapping range.
Inserts a new range waiting to be deleted . Before an insert is called it must call drain_overlap_ranges to clean the overlapping range .
fn insert(&mut self, region_id: u64, start_key: &[u8], end_key: &[u8], stale_sequence: u64) {
        if !self.find_overlap_ranges(&start_key, &end_key).is_empty() {
            panic!(
                "[region {}] register deleting data in [{}, {}) failed due to overlap",
                region_id,
                hex::encode_upper(&start_key),
                hex::encode_upper(&end_key),
            );
        }
        let info = StalePeerInfo {
            region_id,
            end_key: end_key.to_owned(),
            stale_sequence,
        };
        self.ranges.insert(start_key.to_owned(), info);
    }
fn insert ( & mut self , region_id : u64 , start_key : & [ u8 ] , end_key : & [ u8 ] , stale_sequence : u64 ) { if ! self . find_overlap_ranges ( & start_key , & end_key ) . is_empty ( ) { panic ! ( " " region_id hex encode_upper ( start_key ) hex encode_upper ( end_key ) ) ; } let info = StalePeerInfo { region_id , end_key : end_key . to_owned ( ) , stale_sequence , } ; self . ranges . insert ( start_key . to_owned ( ) , info ) ; }
Inserts a new range waiting to be deleted.
Inserts a new range waiting to be deleted .
&mut self
region_id
u64
start_key
&[u8]
end_key
&[u8]
stale_sequence
u64