Skip to content

Commit

Permalink
Update to cpp-driver 2.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
silviucpp committed Apr 15, 2024
1 parent 02f42a0 commit f559ac2
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ matrix:

- os: linux
dist: focal
otp_release: 24.3.1
otp_release: 25.2.1

- os: linux
dist: jammy
otp_release: 25.2.1
otp_release: 26.1.1

- os: osx
osx_image: xcode13.4
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### Changelog:

##### v4.1.2

- Upgrade cpp-driver to v2.17.1
- Remove `use_hostname_resolution` config option.

##### v4.1.1

- Use MacOS build caused by [email protected]
Expand Down
3 changes: 3 additions & 0 deletions build_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ case $OS in
;;

Darwin)
export HOMEBREW_NO_INSTALL_UPGRADE=true
export HOMEBREW_NO_INSTALL_CLEANUP=true
export HOMEBREW_NO_AUTO_UPDATE=1
brew install libuv cmake openssl
export OPENSSL_ROOT_DIR=$(brew --prefix openssl)
export OPENSSL_INCLUDE_DIR=$OPENSSL_ROOT_DIR/include/
Expand Down
1 change: 0 additions & 1 deletion c_src/constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ const char kAtomClusterSettingCoalesceDelay[] = "coalesce_delay";
const char kAtomClusterSettingRequestRatio[] = "request_ratio";
const char kAtomClusterSettingMaxSchemaWaitTime[] = "max_schema_wait_time";
const char kAtomClusterSettingTokenAwareRoutingShuffleReplicas[] = "token_aware_routing_shuffle_replicas";
const char kAtomClusterSettingUseHostnameResolution[] = "use_hostname_resolution";
const char kAtomClusterSettingSpeculativeExecutionPolicy[] = "speculative_execution_policy";
const char kAtomClusterSettingMaxReusableWriteObjects[] = "max_reusable_write_objects";
const char kAtomClusterSettingRequestTimeout[] = "request_timeout";
Expand Down
1 change: 0 additions & 1 deletion c_src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ extern const char kAtomClusterSettingCoalesceDelay[];
extern const char kAtomClusterSettingRequestRatio[];
extern const char kAtomClusterSettingMaxSchemaWaitTime[];
extern const char kAtomClusterSettingTokenAwareRoutingShuffleReplicas[];
extern const char kAtomClusterSettingUseHostnameResolution[];
extern const char kAtomClusterSettingSpeculativeExecutionPolicy[];
extern const char kAtomClusterSettingMaxReusableWriteObjects[];
extern const char kAtomClusterSettingRequestTimeout[];
Expand Down
1 change: 0 additions & 1 deletion c_src/erlcass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ int on_nif_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
ATOMS.atomClusterSettingRequestRatio = make_atom(env, erlcass::kAtomClusterSettingRequestRatio);
ATOMS.atomClusterSettingMaxSchemaWaitTime = make_atom(env, erlcass::kAtomClusterSettingMaxSchemaWaitTime);
ATOMS.atomClusterSettingTokenAwareRoutingShuffleReplicas = make_atom(env, erlcass::kAtomClusterSettingTokenAwareRoutingShuffleReplicas);
ATOMS.atomClusterSettingUseHostnameResolution = make_atom(env, erlcass::kAtomClusterSettingUseHostnameResolution);
ATOMS.atomClusterSettingSpeculativeExecutionPolicy = make_atom(env, erlcass::kAtomClusterSettingSpeculativeExecutionPolicy);
ATOMS.atomClusterSettingMaxReusableWriteObjects = make_atom(env, erlcass::kAtomClusterSettingMaxReusableWriteObjects);
ATOMS.atomClusterSettingRequestTimeout = make_atom(env, erlcass::kAtomClusterSettingRequestTimeout);
Expand Down
1 change: 0 additions & 1 deletion c_src/erlcass.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ struct atoms
ERL_NIF_TERM atomClusterSettingRequestRatio;
ERL_NIF_TERM atomClusterSettingMaxSchemaWaitTime;
ERL_NIF_TERM atomClusterSettingTokenAwareRoutingShuffleReplicas;
ERL_NIF_TERM atomClusterSettingUseHostnameResolution;
ERL_NIF_TERM atomClusterSettingSpeculativeExecutionPolicy;
ERL_NIF_TERM atomClusterSettingMaxReusableWriteObjects;
ERL_NIF_TERM atomClusterSettingRequestTimeout;
Expand Down
1 change: 0 additions & 1 deletion c_src/nif_cass_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ ERL_NIF_TERM apply_cluster_settings(ErlNifEnv* env, ERL_NIF_TERM term_option, ER
INT_SETTING(ATOMS.atomClusterSettingRequestRatio, cass_cluster_set_new_request_ratio);
UNSIGNED_INT_SETTING(ATOMS.atomClusterSettingMaxSchemaWaitTime, internal_cass_cluster_set_max_schema_wait_time);
CUSTOM_SETTING(ATOMS.atomClusterSettingTokenAwareRoutingShuffleReplicas, internal_cass_cluster_set_token_aware_routing_shuffle_replicas);
BOOL_SETTING(ATOMS.atomClusterSettingUseHostnameResolution, cass_cluster_set_use_hostname_resolution);
CUSTOM_SETTING(ATOMS.atomClusterSettingSpeculativeExecutionPolicy, internal_set_speculative_execution_policy);
UNSIGNED_INT_SETTING(ATOMS.atomClusterSettingMaxReusableWriteObjects, cass_cluster_set_max_reusable_write_objects);
UNSIGNED_INT_SETTING(ATOMS.atomClusterSettingRequestTimeout, internal_cass_cluster_set_request_timeout);
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pre_hooks, [{"(linux|darwin)", compile, "make nif_compile CPP_DRIVER_REV=2.16.2"}]}.
{pre_hooks, [{"(linux|darwin)", compile, "make nif_compile CPP_DRIVER_REV=2.17.1"}]}.
{post_hooks, [{"(linux|darwin)", clean, "make nif_clean"}]}.

{project_plugins, [rebar3_hex]}.
Expand Down
2 changes: 1 addition & 1 deletion src/erlcass.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{description, "ErlCass - Erlang Cassandra Driver"},
{licenses, ["MIT"]},
{links,[{"Github","https://github.com/silviucpp/erlcass"}]},
{vsn, "4.1.1"},
{vsn, "4.1.2"},
{registered, []},
{applications, [
kernel,
Expand Down
2 changes: 2 additions & 0 deletions test/integrity_test_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ create_keyspace(_Config) ->
ok ->
ok;
{error,<<"Cannot drop non existing", _/binary>>} ->
ok;
{error, <<"Keyspace 'erlang_driver_test' doesn't exist">>} ->
ok
end,
ok = erlcass:query(<<"CREATE KEYSPACE erlang_driver_test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}">>).
Expand Down
31 changes: 31 additions & 0 deletions test/sys.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
[
{kernel, [
{logger_level, info},
{logger, [

% console log

{handler, default, logger_std_h, #{
formatter => {
logger_formatter, #{
single_line => false,
template => ["[", time,"] ", level, " ", pid, " ", mfa,":",line, " => ", msg,"\n"],
time_offset => "Z"
}
},

config => #{
overload_kill_enable => true,
sync_mode_qlen => 10000,
drop_mode_qlen => 10000,
flush_qlen => 10000
},

filters => [
{remote_group_leader, {fun logger_filters:remote_gl/2, stop}},
{progress, {fun logger_filters:progress/2, stop}},
{sasl, {fun logger_filters:domain/2, {stop, sub, [otp, sasl]}}}
]
}}
]}
]},

{erlcass, [
{cluster_options,[
{contact_points, <<"127.0.0.1">>},
Expand Down

0 comments on commit f559ac2

Please sign in to comment.