From 5bda06877303b4ac01081b12f889db1409c0a6f6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 3 Feb 2012 11:00:54 +1100 Subject: dbwrap_ctdb: only fetch a read-only copy if we had a record already. Because revoking read-only copies of records is expensive, we only want ctdbd to do it for high-turnover records. A basic heuristic is that if we don't find a local copy of the record, don't ask for a read-only copy. The fetch itself will cause ctdbd to migrate the record, so eventually we will have a local copy. Next time it gets migrated away, we'll call ctdbd_fetch() with local_copy = true. Signed-off-by: Rusty Russell --- source3/include/ctdbd_conn.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/include/ctdbd_conn.h') diff --git a/source3/include/ctdbd_conn.h b/source3/include/ctdbd_conn.h index 9a3c27cdb9..2035e8ddfc 100644 --- a/source3/include/ctdbd_conn.h +++ b/source3/include/ctdbd_conn.h @@ -60,7 +60,8 @@ NTSTATUS ctdbd_migrate(struct ctdbd_connection *conn, uint32 db_id, TDB_DATA key); NTSTATUS ctdbd_fetch(struct ctdbd_connection *conn, uint32 db_id, - TDB_DATA key, TALLOC_CTX *mem_ctx, TDB_DATA *data); + TDB_DATA key, TALLOC_CTX *mem_ctx, TDB_DATA *data, + bool local_copy); NTSTATUS ctdbd_traverse(uint32 db_id, void (*fn)(TDB_DATA key, TDB_DATA data, -- cgit