jra asked:
Do you have any idea on how many calls it saves,
and what help the optimization gives ?
As far as calls: Not 100% sure, dtrace pointed the issue out to me, and when I
saw 10-50%(Or more), I looked for an easy fix.
The real expense here is the fnctl locks on the database. That's pretty
painful. 1000ns per call, and probably 3-4 calls in that chain. So it doesn't
take much to come out ahead was my math.
struct serverid_key key;
TDB_DATA tdbkey;
- if (lp_clustering() && !process_exists(*id)) {
+ if (procid_is_me(id)) {
+ return true;
+ }
+
+ if (!process_exists(*id)) {
return false;
}