-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] PIP-188 Support blue-green migration #402
Conversation
Added the 3.5.0 milestone according to https://lists.apache.org/thread/fr4pv2p8yxhxcg2wc9sqdfzm89y8cnox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the IO threads to 8 for ExtensibleLoadManagerTest and found segmentation fault when closing the client.
diff --git a/tests/extensibleLM/ExtensibleLoadManagerTest.cc b/tests/extensibleLM/ExtensibleLoadManagerTest.cc
index 7567569..f4e2c81 100644
--- a/tests/extensibleLM/ExtensibleLoadManagerTest.cc
+++ b/tests/extensibleLM/ExtensibleLoadManagerTest.cc
@@ -70,7 +70,9 @@ TEST(ExtensibleLoadManagerTest, testPubSubWhileUnloading) {
return res == 204 || res == 409;
}));
- Client client{"pulsar://localhost:6650"};
+ ClientConfiguration conf;
+ conf.setIOThreads(8);
+ Client client{"pulsar://localhost:6650", conf};
Producer producer;
ProducerConfiguration producerConfiguration;
Result producerResult = client.createProducer(topicName, producerConfiguration, producer);
2024-02-18 22:00:56.553 INFO [0x16b7d3000] ExtensibleLoadManagerTest:138 | acked i:19
2024-02-18 22:00:56.553 INFO [0x16b7d3000] ExtensibleLoadManagerTest:141 | consumer finished
2024-02-18 22:00:56.554 INFO [0x1e3fea100] ClientImpl:666 | Closing Pulsar client with 1 producers and 1 consumers
2024-02-18 22:00:56.554 INFO [0x1e3fea100] ProducerImpl:799 | [persistent://public/unload-test/topic-1708264824, cluster-a-1-0] Closing producer for topic persistent://public/unload-test/topic-1708264824
2024-02-18 22:00:56.554 INFO [0x1e3fea100] ConsumerImpl:1267 | [persistent://public/unload-test/topic-1708264824, sub, 0] Closing consumer for topic persistent://public/unload-test/topic-1708264824
2024-02-18 22:00:56.561 INFO [0x16b1cf000] ProducerImpl:763 | [persistent://public/unload-test/topic-1708264824, cluster-a-1-0] Closed producer 0
2024-02-18 22:00:56.561 INFO [0x16b1cf000] ConsumerImpl:1251 | [persistent://public/unload-test/topic-1708264824, sub, 0] Closed consumer 0
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:1320 | [[::1]:53157 -> [::1]:6650] Connection disconnected (refCnt: 2)
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:1320 | [[::1]:53154 -> [::1]:6650] Connection disconnected (refCnt: 1)
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:1320 | [[::1]:53164 -> [::1]:6651] Connection disconnected (refCnt: 1)
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:1320 | [[::1]:53181 -> [::1]:6651] Connection disconnected (refCnt: 1)
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:1320 | [[::1]:53153 -> [::1]:6650] Connection disconnected (refCnt: 1)
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:1320 | [[::1]:53163 -> [::1]:6651] Connection disconnected (refCnt: 1)
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:275 | [[::1]:53157 -> [::1]:6650] Destroyed connection to pulsar://broker-1:6650-0
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:275 | [[::1]:53181 -> [::1]:6651] Destroyed connection to pulsar://green-broker-2:6650-0
2024-02-18 22:00:56.561 INFO [0x16b143000] ClientConnection:275 | [[::1]:53164 -> [::1]:6651] Destroyed connection to pulsar://green-broker-1:6650-0
2024-02-18 22:00:56.562 INFO [0x16b143000] ClientConnection:275 | [[::1]:53163 -> [::1]:6651] Destroyed connection to pulsar://localhost:6651-0
2024-02-18 22:00:56.562 INFO [0x16b143000] ClientConnection:275 | [[::1]:53153 -> [::1]:6650] Destroyed connection to pulsar://localhost:6650-0
2024-02-18 22:00:56.562 INFO [0x16b143000] ClientConnection:275 | [[::1]:53154 -> [::1]:6650] Destroyed connection to pulsar://broker-2:6650-0
./run-unit-tests.sh: line 40: 13856 Segmentation fault: 11 $CMAKE_BUILD_DIRECTORY/tests/ExtensibleLoadManagerTest
It appears to be something wrong with the thread safety.
Thanks for sharing this. I tried to reproduce this issue, but I couldn't. Updated the test config instead. |
Okay. I will debug it locally and see if it's a serious problem. |
The segfault is not related to this PR
Master Issue: apache/pulsar#16551
Motivation
Support blue-green migration pip-188 for cpp client
Modifications
Verifying this change
Updated the exisiting extensibleLB test to cover the migration logic.
Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)