From 94cf5cc284ba908675ed5fd573dd101d7b9bad02 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 27 Mar 2012 14:31:04 +0200 Subject: 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. --- source3/lib/dbwrap/dbwrap_file.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/dbwrap/dbwrap_file.c') diff --git a/source3/lib/dbwrap/dbwrap_file.c b/source3/lib/dbwrap/dbwrap_file.c index a8a31e3750..ebe768528b 100644 --- a/source3/lib/dbwrap/dbwrap_file.c +++ b/source3/lib/dbwrap/dbwrap_file.c @@ -367,6 +367,7 @@ struct db_context *db_open_file(TALLOC_CTX *mem_ctx, result->private_data = ctx; result->fetch_locked = db_file_fetch_locked; + result->try_fetch_locked = NULL; result->traverse = db_file_traverse; result->traverse_read = db_file_traverse; result->persistent = ((tdb_flags & TDB_CLEAR_IF_FIRST) == 0); -- cgit