summaryrefslogtreecommitdiffstats
path: root/ctdb/include
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2011-11-08 06:55:46 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2011-11-08 16:08:28 +1100
commit0e79b2d1e8befcc8924112faeb785b0648f35c43 (patch)
treea1130ebbc3a6c2c6bf4a95ac26dc47264dba03f6 /ctdb/include
parent8db9b73920da63c9eaa0822c9dd550714484fa13 (diff)
Record Fetch Collapse: Collapse multiple fetch request into one single request.
When multiple clients fetch the same record concurrently, send only one single fetch across the network and deferr all other fetches locally. This improves performance for hot records and reduces cpu load on ctdb. (This used to be ctdb commit 82d6946ad8b3348e8b9d3d971f24925ade02d1be)
Diffstat (limited to 'ctdb/include')
-rw-r--r--ctdb/include/ctdb_private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 7e59473013..f1818b98de 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -527,6 +527,10 @@ struct ctdb_db_context {
struct ctdb_ltdb_header *header,
TDB_DATA data);
+ /* used to track which records we are currently fetching
+ so we can avoid sending duplicate fetch requests
+ */
+ struct trbt_tree *deferred_fetch;
};