[SCM] CTDB repository - branch master updated - ctdb-1.11-90-g0474a92

Ronnie Sahlberg sahlberg at samba.org
Thu Oct 27 19:57:12 MDT 2011


The branch, master has been updated
       via  0474a9244c6721f85955efcbdd630c0e5990e76c (commit)
       via  e6003e52617385f731ccf93b13d21d5403534a78 (commit)
      from  0452f212f2ddc1089dce83339bad0d73763f238f (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0474a9244c6721f85955efcbdd630c0e5990e76c
Merge: 0452f212f2ddc1089dce83339bad0d73763f238f e6003e52617385f731ccf93b13d21d5403534a78
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Oct 28 12:56:24 2011 +1100

    Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master

commit e6003e52617385f731ccf93b13d21d5403534a78
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Oct 28 12:41:27 2011 +1100

    ReadOnly: If record does not exist, upgrade to write-lock
    
    If we attempt a readonly lock request for a record that do not exist (yet)
    in the local TDB, then upgrade the request to ask for a write lock and force a
    request for migrate the record onto the local node.
    This allows the "only request record on second local request for known contended records"
    heuristics to try to avoid creating readonly delegations unless we have good reason to
    assume it is a contended record.

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

Summary of changes:
 libctdb/ctdb.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libctdb/ctdb.c b/libctdb/ctdb.c
index b555360..099ceac 100644
--- a/libctdb/ctdb.c
+++ b/libctdb/ctdb.c
@@ -806,6 +806,13 @@ static bool try_readrecordlock(struct ctdb_lock *lock, TDB_DATA *data)
 		return true;
 	}
 
+	/* we dont have the record locally,
+	 * drop to writelock to force a migration
+	 */
+	if (!hdr && lock->readonly) {
+		lock->readonly = false;
+	}
+
 	tdb_chainunlock(lock->ctdb_db->tdb, lock->key);
 	free(hdr);
 	return NULL;


-- 
CTDB repository


More information about the samba-cvs mailing list