diff options
| author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2008-07-17 13:50:55 +1000 |
|---|---|---|
| committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2008-07-17 13:50:55 +1000 |
| commit | 6eb4e46fe1f2b14178bbd21930f7bca486a1ed2e (patch) | |
| tree | 8650d21b514d2345b3bbab505fc268c0f9fdd0a2 /ctdb/include | |
| parent | 0964c59dc6706311fd565d91289e922be5e3a864 (diff) | |
| download | samba-6eb4e46fe1f2b14178bbd21930f7bca486a1ed2e.tar.gz samba-6eb4e46fe1f2b14178bbd21930f7bca486a1ed2e.tar.xz samba-6eb4e46fe1f2b14178bbd21930f7bca486a1ed2e.zip | |
Add two new controls to start and cancel a persistent update.
This allows ctdb to automatically start a new full blown recovery
if a client has started updating the local tdb for a persistent database
but is kill -9ed before it has ensured the update is distributed clusterwide.
(This used to be ctdb commit 1ffccb3e0b3b5bd376c5302304029af393709518)
Diffstat (limited to 'ctdb/include')
| -rw-r--r-- | ctdb/include/ctdb_private.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 4124f649fc..66e7709312 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -161,6 +161,7 @@ struct ctdb_client { uint32_t client_id; pid_t pid; struct ctdb_tcp_list *tcp_list; + uint32_t num_persistent_updates; }; @@ -544,6 +545,8 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0, CTDB_CONTROL_DEL_PUBLIC_IP = 78, CTDB_CONTROL_RUN_EVENTSCRIPTS = 79, CTDB_CONTROL_GET_CAPABILITIES = 80, + CTDB_CONTROL_START_PERSISTENT_UPDATE = 81, + CTDB_CONTROL_CANCEL_PERSISTENT_UPDATE= 82, }; /* @@ -812,6 +815,12 @@ int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key, struct ctdb_ltdb_header *header, TDB_DATA data); int ctdb_ltdb_persistent_store(struct ctdb_db_context *ctdb_db, TDB_DATA key, struct ctdb_ltdb_header *header, TDB_DATA data); +int32_t ctdb_control_start_persistent_update(struct ctdb_context *ctdb, + struct ctdb_req_control *c, + TDB_DATA recdata); +int32_t ctdb_control_cancel_persistent_update(struct ctdb_context *ctdb, + struct ctdb_req_control *c, + TDB_DATA recdata); void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr); void ctdb_queue_packet_opcode(struct ctdb_context *ctdb, struct ctdb_req_header *hdr, unsigned opcode); int ctdb_ltdb_lock_requeue(struct ctdb_db_context *ctdb_db, |
