From 199b395c3945759badc8db647efe945bcdd01240 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Mon, 7 Mar 2022 15:52:21 -0600 Subject: [PATCH 1/2] Attempt to avoid entangling PrepareHostHandler and Cluster by avoiding executing host up checks when closing the handler --- src/prepare_host_handler.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/prepare_host_handler.cpp b/src/prepare_host_handler.cpp index 1345ae8d5..df789b322 100644 --- a/src/prepare_host_handler.cpp +++ b/src/prepare_host_handler.cpp @@ -67,8 +67,6 @@ void PrepareHostHandler::prepare(uv_loop_t* loop, const ConnectionSettings& sett } void PrepareHostHandler::on_close(Connection* connection) { - callback_(this); - dec_ref(); // The event loop is done with this handler } From f60fdbd6f1cf3928746eccb843e3602bc83921fc Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Tue, 8 Mar 2022 00:08:00 -0600 Subject: [PATCH 2/2] Minor integration test fix --- tests/src/integration/tests/test_prepare_on.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/src/integration/tests/test_prepare_on.cpp b/tests/src/integration/tests/test_prepare_on.cpp index ee85c8f18..c9cae359b 100644 --- a/tests/src/integration/tests/test_prepare_on.cpp +++ b/tests/src/integration/tests/test_prepare_on.cpp @@ -369,7 +369,7 @@ CASSANDRA_INTEGRATION_TEST_F(PrepareOnUpAndAddTests, NotPreparedOnUpWhenDisabled // Wait for the node to become available and verify no statements have been // prepared - wait_for_node_on_session(session, 1); + wait_for_node_on_session(session_for_node(1), 1); prepared_statements_are_not_present(1); } @@ -404,7 +404,7 @@ CASSANDRA_INTEGRATION_TEST_F(PrepareOnUpAndAddTests, PreparedOnUpWhenEnabled) { // Wait for the node to become available and verify that the statements // in the prepared metadata cache have been prepared - wait_for_node_on_session(session, 1); + wait_for_node_on_session(session_for_node(1), 1); prepared_statements_are_present(1); } @@ -435,7 +435,7 @@ CASSANDRA_INTEGRATION_TEST_F(PrepareOnUpAndAddTests, NotPreparedOnAddWhenDisable // Wait for the new node to become available and verify no statements have // been prepared - wait_for_node_on_session(session, node); + wait_for_node_on_session(session_for_node(node), node); prepared_statements_are_not_present(node); } @@ -466,6 +466,6 @@ CASSANDRA_INTEGRATION_TEST_F(PrepareOnUpAndAddTests, PreparedOnAddWhenEnabled) { // Wait for the new node to become available and verify that the statements // in the prepared metadata cache have been prepared - wait_for_node_on_session(session, node); + wait_for_node_on_session(session_for_node(node), node); prepared_statements_are_present(node); }