Hello!
On Thu, Aug 18, 2016 at 11:00 AM, Alexis Okuwa wrote:
> Are there any plans to have it lock per key and not a global lock, also is
> there anyway to have it to not block other readers.
>
We could introduce a readers-writer lock where multiple readers are
permitted traversing the red-black tree at the same time. But writes
might be delayed a bit more. Patches welcome.
Per-key locking that you proposed does make no sense to me since we
use data structures like red-black trees and linked lists.
I suggest you only try optimizing things that are shown in your on-CPU
and/or off-CPU flame graphs under realistic workload. Otherwise it's a
premature optimization that does you no good :) See
http://openresty.org/en/profiling.html
Regards,
-agentzh