summaryrefslogtreecommitdiffstats
path: root/ctdb/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-19 00:56:49 +1000
committerAndrew Tridgell <tridge@samba.org>2007-05-19 00:56:49 +1000
commit28f2fc669b5697eb2e8fb01c8ab2514ecb9f1199 (patch)
tree54bd4a2ed0b6924bd83caf5048e7e8f21debb23e /ctdb/include
parent049e1504ee7b62f6abd61dddc59558963780d641 (diff)
a better way to resend calls after recovery
(This used to be ctdb commit 444f52e134fc22aaf254d05c86d8b357ded876f4)
Diffstat (limited to 'ctdb/include')
-rw-r--r--ctdb/include/ctdb_private.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 57901ed6a9..0149714c85 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -265,6 +265,7 @@ struct ctdb_context {
uint32_t num_clients;
uint32_t seqnum_frequency;
uint32_t recovery_master;
+ struct ctdb_call_state *pending_calls;
};
struct ctdb_db_context {
@@ -300,11 +301,6 @@ struct ctdb_db_context {
ctdb_fatal(ctdb, "Out of memory in " __location__ ); \
}} while (0)
-/* timeout for ctdb call operations. When this timeout expires we
- check if the generation count has changed, and if it has then
- re-issue the call */
-#define CTDB_CALL_TIMEOUT 2
-
/* maximum timeout for ctdb control calls */
#define CTDB_CONTROL_TIMEOUT 60
@@ -390,6 +386,7 @@ enum call_state {CTDB_CALL_WAIT, CTDB_CALL_DONE, CTDB_CALL_ERROR};
state of a in-progress ctdb call
*/
struct ctdb_call_state {
+ struct ctdb_call_state *next, *prev;
enum call_state state;
uint32_t reqid;
struct ctdb_req_call *c;
@@ -397,7 +394,6 @@ struct ctdb_call_state {
const char *errmsg;
struct ctdb_call call;
uint32_t generation;
- uint32_t resend_count;
struct {
void (*fn)(struct ctdb_call_state *);
void *private_data;
@@ -828,5 +824,6 @@ int ctdb_start_monitoring(struct ctdb_context *ctdb);
void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode);
void ctdb_daemon_cancel_controls(struct ctdb_context *ctdb, struct ctdb_node *node);
+void ctdb_call_resend_all(struct ctdb_context *ctdb);
#endif