Rev 120: add an explanation of ctdb_ltdb_lock_fetch_requeue() in
http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Mon Apr 16 23:18:20 GMT 2007
------------------------------------------------------------
revno: 120
revision-id: tridge at samba.org-20070416231820-74f66bb640e03880
parent: tridge at samba.org-20070416231452-7dfc1928b2b71d20
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Tue 2007-04-17 09:18:20 +1000
message:
add an explanation of ctdb_ltdb_lock_fetch_requeue()
modified:
common/ctdb_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2
=== modified file 'common/ctdb_ltdb.c'
--- a/common/ctdb_ltdb.c 2007-04-16 13:52:14 +0000
+++ b/common/ctdb_ltdb.c 2007-04-16 23:18:20 +0000
@@ -229,6 +229,21 @@
/*
do a non-blocking ltdb_fetch with a locked record, deferring this
ctdb request until we have the chainlock
+
+ It does the following:
+
+ 1) tries to get the chainlock. If it succeeds, then it fetches the record, and
+ returns 0
+
+ 2) if it fails to get a chainlock immediately then it sets up a
+ non-blocking chainlock via ctdb_lockwait, and when it gets the
+ chainlock it re-submits this ctdb request to the main packet
+ receive function
+
+ This effectively queues all ctdb requests that cannot be
+ immediately satisfied until it can get the lock. This means that
+ the main ctdb daemon will not block waiting for a chainlock held by
+ a client
*/
int ctdb_ltdb_lock_fetch_requeue(struct ctdb_db_context *ctdb_db,
TDB_DATA key, struct ctdb_ltdb_header *header,
More information about the samba-cvs
mailing list