diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-05 07:44:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:38 -0500 |
commit | 37fdb858b069d862d53edae11dff42a4696c78a4 (patch) | |
tree | 53813502082c6e789d64464ce5536e93490a773f /source4/lib | |
parent | ba30cbf67bf4ceacd556f6c878d9370b6ddb879f (diff) | |
download | samba-37fdb858b069d862d53edae11dff42a4696c78a4.tar.gz samba-37fdb858b069d862d53edae11dff42a4696c78a4.tar.bz2 samba-37fdb858b069d862d53edae11dff42a4696c78a4.zip |
r7298: ensure messages are sent in order even when under extreme load. This
fixes a IO_TIMEOUT problem in the messaging benchmarks
(This used to be commit c8b220b65de00418d19347cf298cc80d86e8accb)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/messaging/irpc.h | 2 | ||||
-rw-r--r-- | source4/lib/messaging/messaging.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h index 93cadddd34..99a2d60f35 100644 --- a/source4/lib/messaging/irpc.h +++ b/source4/lib/messaging/irpc.h @@ -28,7 +28,7 @@ struct irpc_message { }; /* don't allow calls to take too long */ -#define IRPC_CALL_TIMEOUT 20 +#define IRPC_CALL_TIMEOUT 10 /* the server function type */ diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 4c4b6ea8da..823058b0cf 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -308,7 +308,12 @@ NTSTATUS messaging_send(struct messaging_context *msg, uint32_t server, rec->path = messaging_path(msg, server); talloc_steal(rec, rec->path); - status = try_send(rec); + if (msg->pending != NULL) { + status = STATUS_MORE_ENTRIES; + } else { + status = try_send(rec); + } + if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) { if (msg->pending == NULL) { EVENT_FD_WRITEABLE(msg->event.fde); |