diff options
author | Volker Lendecke <vl@samba.org> | 2012-03-27 14:31:04 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-04-17 10:21:00 +0200 |
commit | 94cf5cc284ba908675ed5fd573dd101d7b9bad02 (patch) | |
tree | fa3cbe066f5400c31cfa13ea149e13bada59fbdc /source3/lib/dbwrap/dbwrap_cache.c | |
parent | bd9178506ed8796a0aa7e4e757f2adc20dcae4f8 (diff) | |
download | samba-94cf5cc284ba908675ed5fd573dd101d7b9bad02.tar.gz samba-94cf5cc284ba908675ed5fd573dd101d7b9bad02.tar.xz samba-94cf5cc284ba908675ed5fd573dd101d7b9bad02.zip |
s3: Add dbwrap_try_fetch_locked
This is designed to spread the load on individual ctdb records to allow upper
layers to do backoff mechanisms. In the ctdb case, do not get the record if a
local lock is already taken. If we are not dmaster, do at most one migrate
attempt.
For the tdb case, this is a nonblocking fetch_locked. If someone else has the
lock, give up.
Diffstat (limited to 'source3/lib/dbwrap/dbwrap_cache.c')
-rw-r--r-- | source3/lib/dbwrap/dbwrap_cache.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap_cache.c b/source3/lib/dbwrap/dbwrap_cache.c index 43c85f7b09..ded85258a3 100644 --- a/source3/lib/dbwrap/dbwrap_cache.c +++ b/source3/lib/dbwrap/dbwrap_cache.c @@ -194,6 +194,7 @@ struct db_context *db_open_cache(TALLOC_CTX *mem_ctx, dbwrap_cache_validate(ctx); db->fetch_locked = dbwrap_cache_fetch_locked; + db->try_fetch_locked = NULL; db->traverse = dbwrap_cache_traverse; db->traverse_read = dbwrap_cache_traverse_read; db->get_seqnum = dbwrap_cache_get_seqnum; |