diff --git a/.gitmodules b/.gitmodules index 136ba68cbe..4aea533e0c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,4 +2,4 @@ path = aerospike-client-c # url = git@github.com:aerospike/aerospike-client-c.git url = https://github.com/aerospike/aerospike-client-c.git - branch = stage + branch = CLIENT-4844 diff --git a/aerospike-client-c b/aerospike-client-c index 48203a3e96..3b4e7512d2 160000 --- a/aerospike-client-c +++ b/aerospike-client-c @@ -1 +1 @@ -Subproject commit 48203a3e96480022dcb74ba85cae2a6ac5fb5fd6 +Subproject commit 3b4e7512d2daa146d8424d49761f902b40cde3d4 diff --git a/aerospike_helpers/expressions/map.py b/aerospike_helpers/expressions/map.py index ac6623705f..9f00791e58 100644 --- a/aerospike_helpers/expressions/map.py +++ b/aerospike_helpers/expressions/map.py @@ -1495,7 +1495,7 @@ class MapGetKeys(_BaseExpr): Return a list of keys from a map. """ - _op = aerospike._AS_EXP_CODE_MAP_KEYS + _op = aerospike._AS_EXP_CODE_MAP_KEYS_IN def __init__( self, @@ -1516,7 +1516,7 @@ class MapGetValues(_BaseExpr): Return a list of values from a map. """ - _op = aerospike._AS_EXP_CODE_MAP_VALUES + _op = aerospike._AS_EXP_CODE_MAP_VALUES_IN def __init__( self, diff --git a/src/main/aerospike.c b/src/main/aerospike.c index 8cd3eaf7f5..9d6c586607 100644 --- a/src/main/aerospike.c +++ b/src/main/aerospike.c @@ -45,7 +45,7 @@ #include PyObject *py_global_hosts = NULL; -int counter = 0xA8000000; +int counter = 0xAC000000; bool user_shm_key = false; PyDoc_STRVAR(client_doc, "client(config) -> client object\n\ @@ -590,8 +590,8 @@ static struct module_constant_name_to_value module_constants[] = { EXPOSE_MACRO(_AS_EXP_CODE_REMOVE_RESULT), EXPOSE_MACRO(_AS_EXP_CODE_IN_LIST), - EXPOSE_MACRO(_AS_EXP_CODE_MAP_KEYS), - EXPOSE_MACRO(_AS_EXP_CODE_MAP_VALUES), + EXPOSE_MACRO(_AS_EXP_CODE_MAP_KEYS_IN), + EXPOSE_MACRO(_AS_EXP_CODE_MAP_VALUES_IN), EXPOSE_STRING_MACRO_FOR_AEROSPIKE_HELPERS(_CDT_FLAGS_KEY), EXPOSE_STRING_MACRO_FOR_AEROSPIKE_HELPERS(_CDT_APPLY_MOD_EXP_KEY), diff --git a/src/main/convert_expressions.c b/src/main/convert_expressions.c index c3a595b77c..6c52330785 100644 --- a/src/main/convert_expressions.c +++ b/src/main/convert_expressions.c @@ -351,8 +351,8 @@ static as_status get_expr_size(int *size_to_alloc, int *intermediate_exprs_size, [OP_MAP_SIZE] = EXP_SZ(as_exp_map_size(NULL, NIL)), [OP_MAP_GET_BY_KEY] = EXP_SZ(as_exp_map_get_by_key(NULL, 0, 0, NIL, NIL)), - [_AS_EXP_CODE_MAP_KEYS] = EXP_SZ(as_exp_map_keys(NIL)), - [_AS_EXP_CODE_MAP_VALUES] = EXP_SZ(as_exp_map_values(NIL)), + [_AS_EXP_CODE_MAP_KEYS_IN] = EXP_SZ(as_exp_map_keys_in(NIL)), + [_AS_EXP_CODE_MAP_VALUES_IN] = EXP_SZ(as_exp_map_values_in(NIL)), [OP_MAP_SIZE] = EXP_SZ(as_exp_map_size(NULL, NIL)), [OP_MAP_GET_BY_KEY_RANGE] = EXP_SZ(as_exp_map_get_by_key_range(NULL, 0, NIL, NIL, NIL)), @@ -1245,11 +1245,11 @@ add_expr_macros(AerospikeClient *self, as_static_pool *static_pool, APPEND_ARRAY(1, as_exp_map_size(temp_expr->ctx, NIL)); // - 1 for bin break; - case _AS_EXP_CODE_MAP_KEYS: - APPEND_ARRAY(1, as_exp_map_keys(NIL)); // - 1 for bin + case _AS_EXP_CODE_MAP_KEYS_IN: + APPEND_ARRAY(1, as_exp_map_keys_in(NIL)); // - 1 for bin break; - case _AS_EXP_CODE_MAP_VALUES: - APPEND_ARRAY(1, as_exp_map_values(NIL)); // - 1 for bin + case _AS_EXP_CODE_MAP_VALUES_IN: + APPEND_ARRAY(1, as_exp_map_values_in(NIL)); // - 1 for bin break; case OP_MAP_GET_BY_KEY: if (get_int64_t(err, AS_PY_MAP_RETURN_KEY, temp_expr->pydict, diff --git a/test/new_tests/test_shared_memory.py b/test/new_tests/test_shared_memory.py new file mode 100644 index 0000000000..2a913ec602 --- /dev/null +++ b/test/new_tests/test_shared_memory.py @@ -0,0 +1,27 @@ +import aerospike +import pytest + + +@pytest.mark.usefixtures("connection_config") +class TestSharedMemory: + @pytest.fixture(autouse=True) + def setup(self): + self.__class__.connection_config["shm"] = {} + + def test_one_client(self): + client = aerospike.client(self.connection_config) + + assert client.is_connected() + + client.close() + + def test_multiple_clients(self): + + client1 = aerospike.client(self.connection_config) + assert client1.is_connected() + + client2 = aerospike.client(self.connection_config) + assert client2.is_connected() + + client1.close() + client2.close()