------------------------------------------------------------
revno: 636
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: s3-ctdb-tridge
timestamp: Fri 2007-10-05 11:48:34 +1000
message:
  we don't need to check the dmaster for ctdb fetch operations on persistent 
databases. This will make contented reads on secrets.tdb and idmap.tdb much 
more scalable
modified:
  source/lib/dbwrap_ctdb.c       dbwrap_ctdb.c-20070415131935-89u7zduywa3g216g-1
=== modified file 'source/lib/dbwrap_ctdb.c'
--- a/source/lib/dbwrap_ctdb.c  2007-09-24 03:53:40 +0000
+++ b/source/lib/dbwrap_ctdb.c  2007-10-05 01:48:34 +0000
@@ -260,10 +260,12 @@
        /*
         * See if we have a valid record and we are the dmaster. If so, we can
         * take the shortcut and just return it.
+        * we bypass the dmaster check for persistent databases
         */
        if ((ctdb_data.dptr != NULL) &&
            (ctdb_data.dsize >= sizeof(struct ctdb_ltdb_header)) &&
-           ((struct ctdb_ltdb_header *)ctdb_data.dptr)->dmaster == 
get_my_vnn()) {
+           (db->persistent ||
+            ((struct ctdb_ltdb_header *)ctdb_data.dptr)->dmaster == 
get_my_vnn())) {
                /* we are the dmaster - avoid the ctdb protocol op */
 
                data->dsize = ctdb_data.dsize - sizeof(struct ctdb_ltdb_header);

Reply via email to