r7298: ensure messages are sent in order even when under extreme load. This
authorAndrew Tridgell <tridge@samba.org>
Sun, 5 Jun 2005 07:44:51 +0000 (07:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:38 +0000 (13:17 -0500)
fixes a IO_TIMEOUT problem in the messaging benchmarks
(This used to be commit c8b220b65de00418d19347cf298cc80d86e8accb)

source4/lib/messaging/irpc.h
source4/lib/messaging/messaging.c

index 93cadddd34a88e24dd0de1f0dc4c63399594d635..99a2d60f357eb8ddb617c78c14550e6ac7dc67b2 100644 (file)
@@ -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 */
index 4c4b6ea8da393fde033848f4df2981d0d3afeed6..823058b0cf12e1951a209ee2880eb0004338715d 100644 (file)
@@ -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);