diff options
author | Michael Adam <obnox@samba.org> | 2012-12-29 17:23:27 +0100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-04-24 18:48:15 +1000 |
commit | 6c98664365011dbdb95f028dff755d1baa28bb9d (patch) | |
tree | 4b2d96ff4555cdc75a46c10c50e2d93f4dc70475 /ctdb | |
parent | b17007ea48be6553939d119be22a2b69f66e4a7d (diff) | |
download | samba-6c98664365011dbdb95f028dff755d1baa28bb9d.tar.gz samba-6c98664365011dbdb95f028dff755d1baa28bb9d.tar.xz samba-6c98664365011dbdb95f028dff755d1baa28bb9d.zip |
vacuum: extend the header comment for ctdb_process_delete_list()
Describe the (new) process more precisely.
And mention that is the last step of the vacuuming process
that is performed on the lmaster.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 06de786c786f1cab4c6721adf47c2cb1e8a72adb)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_vacuum.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index b7860cfd23c..871c1ccd94f 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -847,8 +847,26 @@ static int ctdb_process_vacuum_fetch_lists(struct ctdb_db_context *ctdb_db, /** * Process the delete list: - * Send the records to delete to all other nodes with the - * try_delete_records control. + * + * This is the last step of vacuuming that consistently deletes + * those records that have been migrated with data and can hence + * not be deleted when leaving a node. + * + * In this step, the lmaster does the final deletion of those empty + * records that it is also dmaster for. It has ususally received + * at least some of these records previously from the former dmasters + * with the vacuum fetch message. + * + * This last step is implemented as a 3-phase process to protect from + * races leading to data corruption: + * + * 1) Send the lmaster's copy to all other active nodes with the + * RECEIVE_RECORDS control: The remote nodes store the lmaster's copy. + * 2) Send the records that could successfully be stored remotely + * in step #1 to all active nodes with the TRY_DELETE_RECORDS + * control. The remote notes delete their local copy. + * 3) The lmaster locally deletes its copies of all records that + * could successfully be deleted remotely in step #2. */ static int ctdb_process_delete_list(struct ctdb_db_context *ctdb_db, struct vacuum_data *vdata) |