summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_vacuum.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-12-20 15:58:34 +0100
committerMichael Adam <obnox@samba.org>2011-12-23 17:39:09 +0100
commitbdf395c2e22859dc20c97fa9933c4dad27817e11 (patch)
treec71dca13bc0b9b274e61ba4bc1674c3729b941b5 /ctdb/server/ctdb_vacuum.c
parentc10fc30a388360cdc40b3c5a34c499cccc0d8b4a (diff)
downloadsamba-bdf395c2e22859dc20c97fa9933c4dad27817e11.tar.gz
samba-bdf395c2e22859dc20c97fa9933c4dad27817e11.tar.xz
samba-bdf395c2e22859dc20c97fa9933c4dad27817e11.zip
vacuum: add a comment explaining a race in the vacuum code.
(This used to be ctdb commit 07f1ba54b1617fadd6fe83826dd8e76f37cea071)
Diffstat (limited to 'ctdb/server/ctdb_vacuum.c')
-rw-r--r--ctdb/server/ctdb_vacuum.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c
index 21ab1dbe88a..6a37e675a16 100644
--- a/ctdb/server/ctdb_vacuum.c
+++ b/ctdb/server/ctdb_vacuum.c
@@ -741,6 +741,17 @@ static int ctdb_process_delete_list(struct ctdb_db_context *ctdb_db,
* outdata contains the list of records coming back
* from the node: These are the records that the
* remote node could not delete.
+ *
+ * NOTE: There is a problem here:
+ *
+ * When a node failed to delete the record, but
+ * others succeeded, we may have created gaps in the
+ * history of the record. Hence when a node dies, an
+ * closed file handle might be resurrected or an open
+ * file handle might be lost, leading to blocked access
+ * or data corruption.
+ *
+ * TODO: This needs to be fixed!
*/
records = (struct ctdb_marshall_buffer *)outdata.dptr;
rec = (struct ctdb_rec_data *)&records->data[0];