uint32_t traverse_timeout;
uint32_t keepalive_interval;
uint32_t keepalive_limit;
+ uint32_t holdback_cleanup_interval;
uint32_t max_lacount;
uint32_t recover_timeout;
uint32_t recover_interval;
uint32_t recovery_mode;
TALLOC_CTX *tickle_update_context;
TALLOC_CTX *keepalive_ctx;
+ struct timed_event *holdback_cleanup_te;
struct ctdb_tunable tunable;
enum ctdb_freeze_mode freeze_mode[NUM_DB_PRIORITIES+1];
struct ctdb_freeze_handle *freeze_handles[NUM_DB_PRIORITIES+1];
struct tdb_wrap *ltdb;
struct ctdb_registered_call *calls; /* list of registered calls */
uint32_t seqnum;
- struct timed_event *te;
+ struct timed_event *seqnum_update;
struct ctdb_traverse_local_handle *traverse;
bool transaction_active;
struct ctdb_vacuum_handle *vacuum_handle;
+
+ /*
+ * The keys to hold back until CTDB_CONTROL_GOTIT is being
+ * sent by a client having forced a migration to us.
+ */
+ uint8_t **holdback_keys;
+
+ /*
+ * The CTDB_REQ_CALLs held back according to "holdback_keys"
+ */
+ struct ctdb_req_header **held_back;
};
CTDB_CONTROL_GET_LOG = 117,
CTDB_CONTROL_CLEAR_LOG = 118,
CTDB_CONTROL_TRANS3_COMMIT = 119,
+ CTDB_CONTROL_GET_DB_SEQNUM = 120,
+ CTDB_CONTROL_GOTIT = 121,
};
/*
uint32_t transaction_id;
};
+struct ctdb_control_gotit {
+ uint32_t db_id;
+ uint8_t key[1];
+};
+
/*
state of a in-progress ctdb call in client
*/
void ctdb_stop_keepalive(struct ctdb_context *ctdb);
int32_t ctdb_run_eventscripts(struct ctdb_context *ctdb, struct ctdb_req_control *c, TDB_DATA data, bool *async_reply);
+void ctdb_start_holdback_cleanup(struct ctdb_context *ctdb);
+void ctdb_stop_holdback_cleanup(struct ctdb_context *ctdb);
+int32_t ctdb_control_gotit(struct ctdb_context *ctdb, TDB_DATA indata);
+
void ctdb_daemon_cancel_controls(struct ctdb_context *ctdb, struct ctdb_node *node);
void ctdb_call_resend_all(struct ctdb_context *ctdb);
int32_t ctdb_control_process_exists(struct ctdb_context *ctdb, pid_t pid);
struct ctdb_client *ctdb_find_client_by_pid(struct ctdb_context *ctdb, pid_t pid);
+int32_t ctdb_control_get_db_seqnum(struct ctdb_context *ctdb,
+ TDB_DATA indata,
+ TDB_DATA *outdata);
+
#endif