theoanab / SILK-USENIXATC2019

Code for "SILK: Preventing Latency Spikes in Log-Structured Merge Key-Value Stores" published in USENIX ATC 19
GNU General Public License v2.0
86 stars 25 forks source link

Run db_bench with readrandom have error #2

Open a993096281 opened 5 years ago

a993096281 commented 5 years ago

I find the reason of it, but I don't understand why don't find key with going to disk.

Status DBImpl::GetImpl( ...) {
...
if (!done) {
    //s = Status::TryAgain(); // don't go to disk. See what happens with the latency
    //return s;
    PERF_TIMER_GUARD(get_from_output_files_time);
    sv->current->Get(read_options, lkey, pinnable_val, &s, &merge_context,
                     &range_del_agg, value_found);
    RecordTick(stats_, MEMTABLE_MISS);
    s = Status::TryAgain();
    //READ from DISK <-- shouldn't do this. Should return and re-schedule in a different queue. 
}
...
}

remove s = Status::TryAgain(); can run normally.