summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-01-19 04:32:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:43:48 -0500
commitfaf800d871b72ca4938c5f392d8b6183cce16e9d (patch)
tree9fafe57a05502cb1aa5f849513505b90bdfcd3a8 /source4/cluster/ctdb/common
parent864e228f504d0c73b78681fb69884783c7c689f2 (diff)
downloadsamba-faf800d871b72ca4938c5f392d8b6183cce16e9d.tar.gz
samba-faf800d871b72ca4938c5f392d8b6183cce16e9d.tar.bz2
samba-faf800d871b72ca4938c5f392d8b6183cce16e9d.zip
r20896: make the maximum lacount configurable in smb.conf
at the moment the brlock_ctdb backend will sometimes fail after dmaster migrations. So to pass tests this needs to be set high. Thats a priority to fix. (This used to be commit 45f5c272f366f6a793941d97c9522c5b2b0cb639)
Diffstat (limited to 'source4/cluster/ctdb/common')
-rw-r--r--source4/cluster/ctdb/common/ctdb.c8
-rw-r--r--source4/cluster/ctdb/common/ctdb_call.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/source4/cluster/ctdb/common/ctdb.c b/source4/cluster/ctdb/common/ctdb.c
index ad0345b3c7..dd9a6db770 100644
--- a/source4/cluster/ctdb/common/ctdb.c
+++ b/source4/cluster/ctdb/common/ctdb.c
@@ -48,6 +48,13 @@ void ctdb_set_flags(struct ctdb_context *ctdb, unsigned flags)
ctdb->flags |= flags;
}
+/*
+ set max acess count before a dmaster migration
+*/
+void ctdb_set_max_lacount(struct ctdb_context *ctdb, unsigned count)
+{
+ ctdb->max_lacount = count;
+}
/*
add a node to the list of active nodes
@@ -281,6 +288,7 @@ struct ctdb_context *ctdb_init(struct event_context *ev)
ctdb->ev = ev;
ctdb->upcalls = &ctdb_upcalls;
ctdb->idr = idr_init(ctdb);
+ ctdb->max_lacount = CTDB_DEFAULT_MAX_LACOUNT;
return ctdb;
}
diff --git a/source4/cluster/ctdb/common/ctdb_call.c b/source4/cluster/ctdb/common/ctdb_call.c
index 2bedccc86a..5c0a00c6e9 100644
--- a/source4/cluster/ctdb/common/ctdb_call.c
+++ b/source4/cluster/ctdb/common/ctdb_call.c
@@ -345,7 +345,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
/* if this nodes has done enough consecutive calls on the same record
then give them the record */
if (header.laccessor == c->hdr.srcnode &&
- header.lacount >= CTDB_MAX_LACOUNT) {
+ header.lacount >= ctdb->max_lacount) {
ctdb_call_send_dmaster(ctdb, c, &header, &key, &data);
talloc_free(data.dptr);
return;