fn ingest_maybe_stall(&self) -> bool {
        for cf in SNAPSHOT_CFS {
            // no need to check lock cf
            if plain_file_used(cf) {
                continue;
            }

            let handle = rocksdb::get_cf_handle(&self.kv_db, cf).unwrap();
            if let Some(n) = get_cf_num_files_at_level(&self.kv_db, handle, 0) {
                let options = self.kv_db.get_options_cf(handle);
                let slowdown_trigger = options.get_level_zero_slowdown_writes_trigger();
                // Leave enough buffer to tolerate heavy write workload,
                // which may flush some memtables in a short time.
                if n > slowdown_trigger as u64 / 2 {
                    return true;
                }
            }
        }
        false
    }
// check the number of files at level 0 to avoid write stall after ingesting sst,
// return indicate whether ingest will cause write stall or not.
check the number of files at level 0 to avoid write stall after ingesting sst,
return indicate whether ingest will cause write stall or not.
check the number of files at level 0 to avoid write stall after ingesting sst return indicate whether ingest will cause write stall or not .
fn ingest_maybe_stall(&self) -> bool {
        for cf in SNAPSHOT_CFS {
            // no need to check lock cf
            if plain_file_used(cf) {
                continue;
            }
            let handle = rocksdb::get_cf_handle(&self.kv_db, cf).unwrap();
            if let Some(n) = get_cf_num_files_at_level(&self.kv_db, handle, 0) {
                let options = self.kv_db.get_options_cf(handle);
                let slowdown_trigger = options.get_level_zero_slowdown_writes_trigger();
                // Leave enough buffer to tolerate heavy write workload,
                // which may flush some memtables in a short time.
                if n > slowdown_trigger as u64 / 2 {
                    return true;
                }
            }
        }
        false
    }
fn ingest_maybe_stall ( & self ) -> bool { for cf in SNAPSHOT_CFS { // no need to check lock cf if plain_file_used ( cf ) { continue ; } let handle = rocksdb :: get_cf_handle ( & self . kv_db , cf ) . unwrap ( ) ; if let Some ( n ) = get_cf_num_files_at_level ( & self . kv_db , handle , 0 ) { let options = self . kv_db . get_options_cf ( handle ) ; let slowdown_trigger = options . get_level_zero_slowdown_writes_trigger ( ) ; // Leave enough buffer to tolerate heavy write workload, // which may flush some memtables in a short time. if n > slowdown_trigger as u64 / 2 { return true ; } } } false }
check the number of files at level 0 to avoid write stall after ingesting sst,
return indicate whether ingest will cause write stall or not.
check the number of files at level 0 to avoid write stall after ingesting sst return indicate whether ingest will cause write stall or not .
&self