Skip to content

Commit 50f6c4a

Browse files
committed
Bug#30930132 SUBSCRIPTION REPORTS SENT OUT TOO EARLY BY SUMA DURING NODE RESTART
Problem: During a node restart the suma block of the restarting node sends subscription reports to the new subscriber and, if requested, informs it about all other subscribers. Currently, these reports are sent too early for the subscribers as they won't be connected to the restarting node yet. Due to this they miss out these subscription reports during a node restart. The MySQL Server depends on these subscription reports to maintain a list of other MySQL Servers(participants) connected to the cluster. During schema distribution, the MySQL Server logs the schema change and waits for these participants to finish applying the changes before returning. If all the data nodes connected in a cluster are restarted one by one, the MySQL Servers will miss out on all the subscription reports and thus end up losing all details about the connected participants. Solution: SUMA block changed in order to, during the node restart, wait until all the subscribers are connected to send out the reports. Also, the reporting mechanism is optimized to send to subscribers only the necessary information. New API leve test added to test_event New MTR test ndb_participants added Change-Id: I879fe0fa535f4afd503d85f926f55388ce9f6227
1 parent 251f156 commit 50f6c4a

File tree

6 files changed

+596
-17
lines changed

6 files changed

+596
-17
lines changed

storage/ndb/include/kernel/signaldata/SumaImpl.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2003, 2023, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -593,6 +593,7 @@ struct SumaContinueB
593593
,WAIT_SCAN_TAB_REQ = 10
594594
,WAIT_GET_FRAGMENT = 11
595595
,SEND_SUB_GCP_COMPLETE_REP = 12
596+
,REPORT_SUBSCRIPTION_SET = 13
596597
};
597598
};
598599

storage/ndb/src/kernel/blocks/ERROR_codes.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Next TRPMAN 9501
3434
Next BACKUP 10055
3535
Next PGMAN 11010
3636
Next DBTUX 12010
37-
Next SUMA 13058
37+
Next SUMA 13060
3838
Next LGMAN 15002
3939
Next TSMAN 16002
4040
Next DBSPJ 17000
@@ -859,6 +859,8 @@ SUMA:
859859
13051: Delay the DROP_TRIG_IMPL_REQ
860860
13057: Changing the ndbrequire from checking whether the gci is higher than
861861
the known gci instead of the next gci
862+
13058: Delay subscription reporting during node restart + cause API failure
863+
13059: Delay subscription reporting during node restart
862864

863865
LGMAN:
864866
-----

0 commit comments

Comments
 (0)