From e7e51ddb64cb362d3417eaae7c8d7fd5a5c4ea4d Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 20 Mar 2012 12:20:55 +1100 Subject: LACOUNT: Add back lacount mechanism to defer migrating a fetched/read copy until after default of 20 consecutive requests from the same node This can improve performance slightly on certain workloads where smbds frequently read from the same record (This used to be ctdb commit 035c0d981bde8c0eee8b3f24ba8e2dc817e5b504) --- ctdb/include/ctdb_private.h | 3 ++- ctdb/include/ctdb_protocol.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'ctdb/include') diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index aa687d4311..3dff1c1bcc 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -126,6 +126,7 @@ struct ctdb_tunable { uint32_t recover_pdb_by_seqnum; uint32_t deferred_rebalance_on_node_add; uint32_t fetch_collapse; + uint32_t max_lacount; }; /* @@ -798,7 +799,7 @@ struct ctdb_call_state *ctdb_daemon_call_send_remote(struct ctdb_db_context *ctd int ctdb_call_local(struct ctdb_db_context *ctdb_db, struct ctdb_call *call, struct ctdb_ltdb_header *header, TALLOC_CTX *mem_ctx, - TDB_DATA *data, bool updatetdb); + TDB_DATA *data, bool updatetdb, uint32_t caller); #define ctdb_reqid_find(ctdb, reqid, type) (type *)_ctdb_reqid_find(ctdb, reqid, #type, __location__) diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h index ec52f5626c..8b113c3a0e 100644 --- a/ctdb/include/ctdb_protocol.h +++ b/ctdb/include/ctdb_protocol.h @@ -501,7 +501,8 @@ enum ctdb_trans2_commit_error { struct ctdb_ltdb_header { uint64_t rsn; uint32_t dmaster; - uint32_t reserved1; + uint16_t laccessor; + uint16_t lacount; #define CTDB_REC_FLAG_DEFAULT 0x00000000 #define CTDB_REC_FLAG_MIGRATED_WITH_DATA 0x00010000 #define CTDB_REC_FLAG_VACUUM_MIGRATED 0x00020000 -- cgit