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 :
Line 215 in e038235
And in the bench, there is a multi-thread work load test
SuRF/bench/workload_multi_thread.cpp
Line 28 in e038235
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.