efficient/SuRF

How can the lookUpRange function be parallel?

lzyLuke opened this issue · 1 comments

Hi, I come here again...

Here, the most important feature range query :

bool SuRF::lookupRange(const std::string& left_key, const bool left_inclusive,

And in the bench, there is a multi-thread work load test

positives += (int)thread_arg->filter->lookupRange(txn_keys[i],

This lookUpRange function uses a private class variable iter_. It first calls iter_.clear(), which clear some variables, but do not new them. When multi-threads call this function, they will all modify this variable at the same time which could nullify the programming logic.
Perhaps it should new a iter every time when there is a call?

Thanks!

Yes, you are right. Thanks! To execute lookupRange in parallel, you need separate iterators (we didn't run the multi-threaded range query experiment in our paper). We embed a default iterator in the SuRF class for single-thread performance.