Skip to content

Commit 5ea0c26

Browse files
authored
Merge pull request #357 from riptano/1.10.1_prep
1.10.1 prep
2 parents 4af2425 + ad4705f commit 5ea0c26

8 files changed

Lines changed: 119 additions & 30 deletions

File tree

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
1.10.1
2+
===========
3+
4+
Bug Fixes
5+
--------
6+
* [CPP-849] Error result doesn't allow access to keyspace, table, and function
7+
data
8+
* [CPP-851] Disable deprecated warnings for std::ptr_fun
9+
* [CPP-879] Allow remote hosts to come back up even if policy ignores down hosts
10+
(community PR from kw217)
11+
12+
Other
13+
--------
14+
* [CPP-220] Remove use of external Boost from unit and integration tests.
15+
* We ported all integration tests from Boost to Google test. This includes
16+
several JIRA issues included in the [CPP-220] epic.
17+
* [CPP-853] Correct linking libraries for unix based OS when using
18+
CASS_USE_STATIC_LIBS=On
19+
* [CPP-859] Remove vc_build.bat scripts and update building documentation
20+
* [CPP-872] Fix GCC 9.2+ build
21+
* [CPP-878] Correct compile flags for libraries and executable
22+
* [CPP-882] Correct pthread compiler flag for older CMake versions
23+
24+
Community
25+
--------
26+
* Fix build error when compiling without an SSL implementation (kmaragon)
27+
(community PR from kw217)
28+
129
1.10.0
230
===========
331

cpp-driver/CHANGELOG.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,52 @@
1+
2.14.1
2+
===========
3+
4+
Bug Fixes
5+
--------
6+
* [CPP-849] Error result doesn't allow access to keyspace, table, and function
7+
data
8+
* [CPP-851] Disable deprecated warnings for std::ptr_fun
9+
* [CPP-879] Allow remote hosts to come back up even if policy ignores down hosts
10+
(community PR from kw217)
11+
12+
Other
13+
--------
14+
* [CPP-220] Remove use of external Boost from unit and integration tests.
15+
* We ported all integration tests from Boost to Google test. This includes
16+
several JIRA issues included in the [CPP-220] epic.
17+
* [CPP-853] Correct linking libraries for unix based OS when using
18+
CASS_USE_STATIC_LIBS=On
19+
* [CPP-859] Remove vc_build.bat scripts and update building documentation
20+
* [CPP-872] Fix GCC 9.2+ build
21+
* [CPP-878] Correct compile flags for libraries and executable
22+
* [CPP-882] Correct pthread compiler flag for older CMake versions
23+
24+
Community
25+
--------
26+
* Fix build error when compiling without an SSL implementation (kmaragon)
27+
128
2.14.0
229
===========
330

431
Bug Fixes
532
--------
6-
* [CPP-819] - Ensure port is updated on already assigned contact points
7-
* [CPP-825] - Cloud should be verifying the peer certificates CN
33+
* [CPP-819] Ensure port is updated on already assigned contact points
34+
* [CPP-825] Cloud should be verifying the peer certificates CN
835

936
2.14.0-alpha2
1037
===========
1138

1239
Features
1340
--------
14-
* [CPP-812] - Enable warnings for implicit casts and fix problems
15-
* [CPP-813] - Detect CaaS and change consistency default
16-
* [CPP-817] - Provide error if mixed usage of secure connect bundle and contact points/ssl context
41+
* [CPP-812] Enable warnings for implicit casts and fix problems
42+
* [CPP-813] Detect CaaS and change consistency default
43+
* [CPP-817] Provide error if mixed usage of secure connect bundle and contact points/ssl context
1744

1845
Bug Fixes
1946
--------
20-
* [CPP-802] - Handle prepared id mismatch when repreparing on the fly
21-
* [CPP-815] - Schema agreement fails with SNI
22-
* [CPP-811] - Requests won't complete if they exceed the number of streams on a connection
47+
* [CPP-802] Handle prepared id mismatch when repreparing on the fly
48+
* [CPP-815] Schema agreement fails with SNI
49+
* [CPP-811] Requests won't complete if they exceed the number of streams on a connection
2350

2451
2.14.0-alpha
2552
===========

cpp-driver/cmake/modules/CppDriver.cmake

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,13 @@ macro(CassUseLibuv)
420420
message(FATAL_ERROR "Unable to Locate libuv: libuv v1.0.0+ is required")
421421
endif()
422422

423-
if (LIBUV_VERSION VERSION_LESS "1.0")
423+
if(LIBUV_VERSION VERSION_LESS "1.0")
424424
message(FATAL_ERROR "Libuv version ${LIBUV_VERSION} is not "
425425
" supported. Please updgrade to libuv version 1.0 or greater in order to "
426426
"utilize the driver.")
427427
endif()
428428

429-
if (LIBUV_VERSION VERSION_LESS "1.6")
429+
if(LIBUV_VERSION VERSION_LESS "1.6")
430430
message(WARNING "Libuv version ${LIBUV_VERSION} does not support custom "
431431
"memory allocators (version 1.6 or greater required)")
432432
endif()
@@ -436,10 +436,16 @@ macro(CassUseLibuv)
436436
set(CASS_LIBS ${CASS_LIBS} ${LIBUV_LIBRARIES})
437437

438438
# libuv and gtests require thread library
439-
set (THREADS_PREFER_PTHREAD_FLAG 1)
439+
set(CMAKE_THREAD_PREFER_PTHREAD 1)
440+
set(THREADS_PREFER_PTHREAD_FLAG 1)
440441
find_package(Threads REQUIRED)
441442
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
442443
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
444+
if(NOT WIN32 AND ${CMAKE_VERSION} VERSION_LESS "3.1.0")
445+
# FindThreads in CMake versions < v3.1.0 do not have the THREADS_PREFER_PTHREAD_FLAG to prefer -pthread
446+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
447+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
448+
endif()
443449
endmacro()
444450

445451
#------------------------

cpp-driver/include/cassandra.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
#define CASS_VERSION_MAJOR 2
5555
#define CASS_VERSION_MINOR 14
56-
#define CASS_VERSION_PATCH 0
56+
#define CASS_VERSION_PATCH 1
5757
#define CASS_VERSION_SUFFIX ""
5858

5959
#ifdef __cplusplus

cpp-driver/src/request_processor.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,7 @@ void RequestProcessor::internal_host_ready(const Host::Ptr& host) {
462462
LoadBalancingPolicy::Vec policies = load_balancing_policies();
463463
for (LoadBalancingPolicy::Vec::const_iterator it = policies.begin(); it != policies.end();
464464
++it) {
465-
if ((*it)->distance(host) != CASS_HOST_DISTANCE_IGNORE) {
466-
(*it)->on_host_up(host);
467-
}
465+
(*it)->on_host_up(host);
468466
}
469467
}
470468
}

cpp-driver/tests/src/unit/tests/test_name_resolver.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
#include "callback.hpp"
2020
#include "name_resolver.hpp"
2121

22-
#ifdef WIN32
23-
#include "winsock.h"
24-
#endif
25-
2622
#define RESOLVE_TIMEOUT 2000
2723

2824
using namespace datastax;
@@ -54,21 +50,15 @@ class NameResolverUnitTest : public LoopTest {
5450
};
5551

5652
TEST_F(NameResolverUnitTest, Simple) {
57-
NameResolver::Ptr resolver(create(Address("127.0.0.1", 9042)));
53+
NameResolver::Ptr resolver(create(Address("127.254.254.254", 9042)));
5854
resolver->resolve(loop(), RESOLVE_TIMEOUT);
5955
run_loop();
6056
ASSERT_EQ(NameResolver::SUCCESS, status());
61-
#ifdef WIN32
62-
char win_hostname[64];
63-
gethostname(win_hostname, 64);
64-
EXPECT_EQ(String(win_hostname), hostname());
65-
#else
66-
EXPECT_EQ("localhost", hostname());
67-
#endif
57+
EXPECT_EQ("cpp-driver.hostname.", hostname());
6858
}
6959

7060
TEST_F(NameResolverUnitTest, Timeout) {
71-
NameResolver::Ptr resolver(create(Address("127.0.0.1", 9042)));
61+
NameResolver::Ptr resolver(create(Address("127.254.254.254", 9042)));
7262

7363
// Libuv's address resolver uses the uv_work thread pool to handle resolution
7464
// asynchronously. If we starve all the threads in the uv_work thread pool
@@ -91,7 +81,7 @@ TEST_F(NameResolverUnitTest, Invalid) {
9181
}
9282

9383
TEST_F(NameResolverUnitTest, Cancel) {
94-
NameResolver::Ptr resolver(create(Address("127.0.0.1", 9042)));
84+
NameResolver::Ptr resolver(create(Address("127.254.254.254", 9042)));
9585
resolver->resolve(loop(), RESOLVE_TIMEOUT);
9686
resolver->cancel();
9787
run_loop();

cpp-driver/tests/src/unit/tests/test_session.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,46 @@ TEST_F(SessionUnitTest, DefaultConsistencyExecutionProfileNotUpdated) {
935935
close(&session);
936936
}
937937

938+
TEST_F(SessionUnitTest, RemoteDCNodeRecovery) {
939+
mockssandra::SimpleCluster cluster(simple(), 1, 1); // 1 local DC node and 1 remote DC node
940+
ASSERT_EQ(cluster.start_all(), 0);
941+
942+
ExecutionProfile profile;
943+
Config config;
944+
config.set_constant_reconnect(100); // Faster reconnect time to handle node outages
945+
config.contact_points().push_back(Address("127.0.0.1", 9042));
946+
config.set_load_balancing_policy(new DCAwarePolicy("dc1", 1));
947+
948+
Session session;
949+
connect(config, &session);
950+
951+
cluster.stop(1); // Force using the remote node
952+
953+
cluster.stop(2); // Force the remote node down and up
954+
cluster.start(2);
955+
956+
bool remote_dc_node_recovered = false;
957+
958+
// Wait for the remote DC node to become available
959+
for (int i = 0; i < 20; ++i) { // Around 2 seconds
960+
QueryRequest::Ptr request(new QueryRequest("blah", 0));
961+
request->set_consistency(CASS_CONSISTENCY_ONE); // Don't use a LOCAL consistency
962+
request->set_record_attempted_addresses(true);
963+
ResponseFuture::Ptr future = session.execute(request, NULL);
964+
EXPECT_TRUE(future->wait_for(WAIT_FOR_TIME));
965+
if (!future->error() && !future->attempted_addresses().empty() &&
966+
Address("127.0.0.2", 9042) == future->attempted_addresses()[0]) {
967+
remote_dc_node_recovered = true;
968+
break;
969+
}
970+
test::Utils::msleep(100);
971+
}
972+
973+
EXPECT_TRUE(remote_dc_node_recovered);
974+
975+
close(&session);
976+
}
977+
938978
TEST_F(SessionUnitTest, DbaasDetectionUpdateDefaultConsistency) {
939979
mockssandra::SimpleRequestHandlerBuilder builder;
940980
builder.on(mockssandra::OPCODE_OPTIONS).execute(new SupportedDbaasOptions());

include/dse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
#define DSE_VERSION_MAJOR 1
5252
#define DSE_VERSION_MINOR 10
53-
#define DSE_VERSION_PATCH 0
53+
#define DSE_VERSION_PATCH 1
5454
#define DSE_VERSION_SUFFIX ""
5555

5656
#ifdef __cplusplus

0 commit comments

Comments
 (0)