The branch, v3-6-test has been updated
       via  9bf2b30 Fix bug #8395 - optimize serverid_exists() for Solaris.
      from  8d46b29 talloc: check block count aftter references test

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 9bf2b3034b4c9523bfac779e518a2a1a6d76ef46
Author: Ira Cooper <i...@wakeful.net>
Date:   Mon Aug 22 12:46:41 2011 -0700

    Fix bug #8395 - optimize serverid_exists() for Solaris.
    
    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.

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/serverid.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index b1f6a57..8cd7f5a 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -233,7 +233,11 @@ bool serverid_exists(const struct server_id *id)
        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;
        }
 


-- 
Samba Shared Repository

Reply via email to