1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-19 18:50:24 +03:00

- prevent sending dmaster requests to ourselves

- add some debug code

(This used to be ctdb commit 26ad1ec3a3b872520a735e4fe4f224f716643731)
This commit is contained in:
Andrew Tridgell 2007-04-21 09:22:46 +02:00
parent 3fb0fa97b3
commit 520f7971cd
2 changed files with 8 additions and 6 deletions

View File

@ -370,9 +370,10 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
then give them the record
or if the node requested an immediate migration
*/
if ( (header.laccessor == c->hdr.srcnode
&& header.lacount >= ctdb->max_lacount)
|| c->flags&CTDB_IMMEDIATE_MIGRATION ) {
if ( c->hdr.srcnode != ctdb->vnn &&
((header.laccessor == c->hdr.srcnode
&& header.lacount >= ctdb->max_lacount)
|| (c->flags&CTDB_IMMEDIATE_MIGRATION)) ) {
ctdb_call_send_dmaster(ctdb_db, c, &header, &call.key, &data);
talloc_free(data.dptr);
ctdb_ltdb_unlock(ctdb_db, call.key);
@ -419,7 +420,7 @@ void ctdb_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
state = idr_find_type(ctdb->idr, hdr->reqid, struct ctdb_call_state);
if (state == NULL) {
DEBUG(0, ("reqid %d not found\n", hdr->reqid));
DEBUG(0, (__location__ " reqid %d not found\n", hdr->reqid));
return;
}
@ -562,6 +563,7 @@ void ctdb_call_timeout(struct event_context *ev, struct timed_event *te,
struct timeval t, void *private_data)
{
struct ctdb_call_state *state = talloc_get_type(private_data, struct ctdb_call_state);
DEBUG(0,(__location__ " call timeout for reqid %d\n", state->c->hdr.reqid));
state->state = CTDB_CALL_ERROR;
ctdb_set_error(state->node->ctdb, "ctdb_call %u timed out",
state->c->hdr.reqid);

View File

@ -71,7 +71,7 @@ static void ctdb_client_reply_call(struct ctdb_context *ctdb, struct ctdb_req_he
state = idr_find_type(ctdb->idr, hdr->reqid, struct ctdb_client_call_state);
if (state == NULL) {
DEBUG(0, ("reqid %d not found\n", hdr->reqid));
DEBUG(0,(__location__ " reqid %d not found\n", hdr->reqid));
return;
}
@ -628,7 +628,7 @@ static void ctdb_reply_status(struct ctdb_context *ctdb, struct ctdb_req_header
state = idr_find_type(ctdb->idr, hdr->reqid, struct ctdb_status_state);
if (state == NULL) {
DEBUG(0, ("reqid %d not found\n", hdr->reqid));
DEBUG(0,(__location__ " reqid %d not found\n", hdr->reqid));
return;
}