|
|
d1681e |
From 8879d72884396de4ae2ff41649de5f2d916d272b Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Milind Changire <mchangir@redhat.com>
|
|
|
d1681e |
Date: Fri, 13 Apr 2018 10:53:46 +0530
|
|
|
d1681e |
Subject: [PATCH 257/260] rpc: rearm listener socket early
|
|
|
d1681e |
|
|
|
d1681e |
Problem:
|
|
|
d1681e |
On node reboot, when glusterd starts volumes, a setup with a large
|
|
|
d1681e |
number of bricks might cause SYN Flooding and connections to be dropped
|
|
|
d1681e |
if the connections are not accepted quickly enough.
|
|
|
d1681e |
|
|
|
d1681e |
Solution:
|
|
|
d1681e |
accept() the connection and rearm the listener socket early to receive
|
|
|
d1681e |
more connection requests as soon as possible.
|
|
|
d1681e |
|
|
|
d1681e |
mainline:
|
|
|
d1681e |
> Reviewed-on: https://review.gluster.org/19833
|
|
|
d1681e |
> Change-Id: Ibed421e50284c3f7a8fcdb4de7ac86cf53d4b74e
|
|
|
d1681e |
> fixes: bz#1564600
|
|
|
d1681e |
> Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: I4bf45b8a12f738ed9b398246e22dfd29e6b1010c
|
|
|
d1681e |
BUG: 1563804
|
|
|
d1681e |
Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/135513
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
rpc/rpc-transport/socket/src/socket.c | 5 +++--
|
|
|
d1681e |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
|
|
|
d1681e |
index a6be911..b98efdc 100644
|
|
|
d1681e |
--- a/rpc/rpc-transport/socket/src/socket.c
|
|
|
d1681e |
+++ b/rpc/rpc-transport/socket/src/socket.c
|
|
|
d1681e |
@@ -2746,6 +2746,9 @@ socket_server_event_handler (int fd, int idx, int gen, void *data,
|
|
|
d1681e |
if (poll_in) {
|
|
|
d1681e |
new_sock = accept (priv->sock, SA (&new_sockaddr), &addrlen);
|
|
|
d1681e |
|
|
|
d1681e |
+ if (ctx)
|
|
|
d1681e |
+ event_handled (ctx->event_pool, fd, idx, gen);
|
|
|
d1681e |
+
|
|
|
d1681e |
if (new_sock == -1) {
|
|
|
d1681e |
gf_log (this->name, GF_LOG_WARNING,
|
|
|
d1681e |
"accept on %d failed (%s)",
|
|
|
d1681e |
@@ -2968,8 +2971,6 @@ socket_server_event_handler (int fd, int idx, int gen, void *data,
|
|
|
d1681e |
}
|
|
|
d1681e |
}
|
|
|
d1681e |
out:
|
|
|
d1681e |
- event_handled (ctx->event_pool, fd, idx, gen);
|
|
|
d1681e |
-
|
|
|
d1681e |
if (cname && (cname != this->ssl_name)) {
|
|
|
d1681e |
GF_FREE(cname);
|
|
|
d1681e |
}
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|