Rev 636: 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 in http://samba.org/~tridge/3_0-ctdb

tridge at samba.org tridge at samba.org
Fri Oct 5 01:48:36 GMT 2007


------------------------------------------------------------
revno: 636
revision-id: tridge at samba.org-20071005014834-a60dtesnpkdro0w8
parent: tridge at samba.org-20070928211141-jdzu9gp2g094wzok
committer: Andrew Tridgell <tridge at samba.org>
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);



More information about the samba-cvs mailing list