1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

Revert "Add a new header flag for "migrated with data" and set this to 1"

This reverts commit a8cc35191df1cd4b866897df71d317ce5f198cb5.

(This used to be ctdb commit 7c37435fb517a621c45b21a21b4eb15f8bbd3c83)
This commit is contained in:
Ronnie Sahlberg 2010-12-13 14:23:32 +11:00
parent f815237f8f
commit dff88a8a6a

View File

@ -202,10 +202,9 @@ static void ctdb_call_send_dmaster(struct ctdb_db_context *ctdb_db,
}
if (data->dsize != 0) {
header->flags |= CTDB_REC_FLAG_MIGRATED_WITH_DATA;
header->flags &= CTDB_REC_FLAG_MIGRATED_WITH_DATA;
}
if (lmaster == ctdb->pnn) {
ctdb_send_dmaster_reply(ctdb_db, header, *key, *data,
c->hdr.srcnode, c->hdr.reqid);
@ -227,19 +226,10 @@ static void ctdb_call_send_dmaster(struct ctdb_db_context *ctdb_db,
memcpy(&r->data[key->dsize], data->dptr, data->dsize);
header->dmaster = c->hdr.srcnode;
if (data->dsize == 0
&& lmaster != ctdb->pnn
&& (header->flags & CTDB_REC_FLAG_MIGRATED_WITH_DATA) == 0) {
if (ctdb_ltdb_delete(ctdb_db, *key) != 0) {
ctdb_fatal(ctdb, "Failed to delete empty record when migrating it off the node");
}
} else {
if (ctdb_ltdb_store(ctdb_db, *key, header, *data) != 0) {
ctdb_fatal(ctdb, "Failed to store record in ctdb_call_send_dmaster");
}
if (ctdb_ltdb_store(ctdb_db, *key, header, *data) != 0) {
ctdb_fatal(ctdb, "Failed to store record in ctdb_call_send_dmaster");
}
ctdb_queue_packet(ctdb, &r->hdr);
talloc_free(r);
@ -267,10 +257,6 @@ static void ctdb_become_dmaster(struct ctdb_db_context *ctdb_db,
header.rsn = rsn + 1;
header.dmaster = ctdb->pnn;
if (data.dsize != 0) {
header.flags |= CTDB_REC_FLAG_MIGRATED_WITH_DATA;
}
if (ctdb_ltdb_store(ctdb_db, key, &header, data) != 0) {
ctdb_fatal(ctdb, "ctdb_reply_dmaster store failed\n");
@ -369,10 +355,6 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr
return;
}
if (data.dsize != 0) {
header.flags |= CTDB_REC_FLAG_MIGRATED_WITH_DATA;
}
if (ctdb_lmaster(ctdb, &key) != ctdb->pnn) {
DEBUG(DEBUG_ALERT,("pnn %u dmaster request to non-lmaster lmaster=%u gen=%u curgen=%u\n",
ctdb->pnn, ctdb_lmaster(ctdb, &key),