The Samba-Bugzilla – Attachment 13659 Details for
Bug 13056
CTDB starts consuming memory if there are dead nodes in the cluster
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for v4-6
BZ13056-v4-6.patch (text/plain), 4.16 KB, created by
Amitay Isaacs
on 2017-10-06 01:29:42 UTC
(
hide
)
Description:
Patches for v4-6
Filename:
MIME Type:
Creator:
Amitay Isaacs
Created:
2017-10-06 01:29:42 UTC
Size:
4.16 KB
patch
obsolete
>From 8ad7944102628119043d06ac4d98365a6e83555a Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Thu, 28 Sep 2017 11:47:00 +1000 >Subject: [PATCH 1/3] ctdb-daemon: Send broadcast to connected nodes, not > configured nodes > >https://bugzilla.samba.org/show_bug.cgi?id=13056 > >Database recovery takes care of attaching missing databases on all the nodes. > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> >(cherry picked from commit 70d306373e80eafe3a356c60a823a2577001d7d1) >--- > ctdb/server/ctdb_ltdb_server.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c >index 8ff963419f1..22a1ee89fd6 100644 >--- a/ctdb/server/ctdb_ltdb_server.c >+++ b/ctdb/server/ctdb_ltdb_server.c >@@ -1208,7 +1208,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, > lockdown_memory(ctdb->valgrinding); > > /* tell all the other nodes about this database */ >- ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, tdb_flags, >+ ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_CONNECTED, tdb_flags, > persistent?CTDB_CONTROL_DB_ATTACH_PERSISTENT: > CTDB_CONTROL_DB_ATTACH, > 0, CTDB_CTRL_FLAG_NOREPLY, >@@ -1263,7 +1263,8 @@ int32_t ctdb_control_db_detach(struct ctdb_context *ctdb, TDB_DATA indata, > client = reqid_find(ctdb->idr, client_id, struct ctdb_client); > if (client != NULL) { > /* forward the control to all the nodes */ >- ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, 0, >+ ctdb_daemon_send_control(ctdb, >+ CTDB_BROADCAST_CONNECTED, 0, > CTDB_CONTROL_DB_DETACH, 0, > CTDB_CTRL_FLAG_NOREPLY, > indata, NULL, NULL); >-- >2.13.6 > > >From 930f6c67e2fee616d36e87884e50201a3e3512b7 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Thu, 28 Sep 2017 11:47:24 +1000 >Subject: [PATCH 2/3] ctdb-tests: Send broadcast to connected nodes, not > configured nodes > >https://bugzilla.samba.org/show_bug.cgi?id=13056 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> >(cherry picked from commit bf11bea5dbb589186a205fa1d81368cc89a6139b) >--- > ctdb/tests/src/cluster_wait.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/ctdb/tests/src/cluster_wait.c b/ctdb/tests/src/cluster_wait.c >index 1405738ac47..ecd2efdf314 100644 >--- a/ctdb/tests/src/cluster_wait.c >+++ b/ctdb/tests/src/cluster_wait.c >@@ -264,7 +264,7 @@ static void cluster_wait_join_unregistered(struct tevent_req *subreq) > msg.data.data = tdb_null; > > subreq = ctdb_client_message_send(state, state->ev, state->client, >- CTDB_BROADCAST_ALL, &msg); >+ CTDB_BROADCAST_CONNECTED, &msg); > if (tevent_req_nomem(subreq, req)) { > return; > } >-- >2.13.6 > > >From 5f053bf0adcc4dd9be5d88e68fa1eae15dd2b4e2 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Fri, 29 Sep 2017 14:23:24 +1000 >Subject: [PATCH 3/3] ctdb-common: Do not queue a packet if queue does not have > valid fd > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13056 > >The only time a ctdb_queue is created without valid fd is when CTDB >is trying to establish connections with other nodes in the cluster. >All the other uses always create a ctdb_queue with valid fd. > >This avoids queueing up packets for dead nodes or nodes that are not >running in the cluster and stops consuming memory. > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> >(cherry picked from commit ddd97553f0a8bfaada178ec4a7460d76fa21f079) >--- > ctdb/common/ctdb_io.c | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c >index 152d535f0e5..3e732e8527d 100644 >--- a/ctdb/common/ctdb_io.c >+++ b/ctdb/common/ctdb_io.c >@@ -300,6 +300,11 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length) > struct ctdb_queue_pkt *pkt; > uint32_t length2, full_length; > >+ /* If the queue does not have valid fd, no point queueing a packet */ >+ if (queue->fd == -1) { >+ return 0; >+ } >+ > if (queue->alignment) { > /* enforce the length and alignment rules from the tcp packet allocator */ > length2 = (length+(queue->alignment-1)) & ~(queue->alignment-1); >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
martins
:
review+
Actions:
View
Attachments on
bug 13056
: 13659 |
13660