diff --git a/test/src/unit-capi-array.cc b/test/src/unit-capi-array.cc index 0fe99152571..fc643e84bc2 100644 --- a/test/src/unit-capi-array.cc +++ b/test/src/unit-capi-array.cc @@ -2605,13 +2605,12 @@ TEST_CASE_METHOD( 1, &buff); REQUIRE(rc == TILEDB_OK); - auto st = tiledb::sm::serialization::array_deserialize( + tiledb::sm::serialization::array_deserialize( array->array_.get(), tiledb::sm::SerializationType::CAPNP, buff->buffer(), - ctx_->storage_manager(), + ctx_->context().resources(), memory_tracker_); - REQUIRE(st.ok()); // 6. Server: Close array and clean up rc = tiledb_array_close(ctx_, deserialized_array_server); diff --git a/test/src/unit-enumerations.cc b/test/src/unit-enumerations.cc index c7f5747d0e2..4ed163239ca 100644 --- a/test/src/unit-enumerations.cc +++ b/test/src/unit-enumerations.cc @@ -5,7 +5,7 @@ * * The MIT License * - * @copyright Copyright (c) 2023 TileDB Inc. + * @copyright Copyright (c) 2023-2024 TileDB Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -2950,8 +2950,8 @@ void EnumerationFx::ser_des_array( SerializationType stype) { Buffer buf; throw_if_not_ok(serialization::array_serialize(in, stype, &buf, client_side)); - throw_if_not_ok(serialization::array_deserialize( - out, stype, buf, ctx.storage_manager(), memory_tracker_)); + serialization::array_deserialize( + out, stype, buf, ctx.resources(), memory_tracker_); } #else // No TILEDB_SERIALIZATION diff --git a/tiledb/sm/array/array.cc b/tiledb/sm/array/array.cc index 837beac2ef0..4c9e4494ae1 100644 --- a/tiledb/sm/array/array.cc +++ b/tiledb/sm/array/array.cc @@ -173,11 +173,7 @@ Status Array::open_without_fragments( } set_array_schema_latest(array_schema_latest.value()); } else { - auto st = rest_client->post_array_from_rest( - array_uri_, storage_manager_, this); - if (!st.ok()) { - throw StatusException(st); - } + rest_client->post_array_from_rest(array_uri_, resources_, this); } } else { { @@ -338,11 +334,7 @@ Status Array::open( throw_if_not_ok(st); set_array_schema_latest(array_schema_latest.value()); } else { - auto st = rest_client->post_array_from_rest( - array_uri_, storage_manager_, this); - if (!st.ok()) { - throw StatusException(st); - } + rest_client->post_array_from_rest(array_uri_, resources_, this); } } else if (query_type == QueryType::READ) { { diff --git a/tiledb/sm/c_api/tiledb.cc b/tiledb/sm/c_api/tiledb.cc index 9110f43136c..44774639d5a 100644 --- a/tiledb/sm/c_api/tiledb.cc +++ b/tiledb/sm/c_api/tiledb.cc @@ -3431,14 +3431,14 @@ int32_t tiledb_deserialize_array( auto memory_tracker = ctx->context().resources().create_memory_tracker(); memory_tracker->set_type(sm::MemoryTrackerType::ARRAY_LOAD); - if (SAVE_ERROR_CATCH( - ctx, - tiledb::sm::serialization::array_deserialize( - (*array)->array_.get(), - (tiledb::sm::SerializationType)serialize_type, - buffer->buffer(), - ctx->storage_manager(), - memory_tracker))) { + try { + tiledb::sm::serialization::array_deserialize( + (*array)->array_.get(), + (tiledb::sm::SerializationType)serialize_type, + buffer->buffer(), + ctx->context().resources(), + memory_tracker); + } catch (StatusException& e) { delete *array; *array = nullptr; return TILEDB_ERR; diff --git a/tiledb/sm/rest/rest_client.cc b/tiledb/sm/rest/rest_client.cc index 5c1a758104a..1429b36b3da 100644 --- a/tiledb/sm/rest/rest_client.cc +++ b/tiledb/sm/rest/rest_client.cc @@ -5,7 +5,7 @@ * * The MIT License * - * @copyright Copyright (c) 2018-2023 TileDB, Inc. + * @copyright Copyright (c) 2018-2024 TileDB, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -74,8 +74,22 @@ using namespace tiledb::common; -namespace tiledb { -namespace sm { +namespace tiledb::sm { + +class RestClientException : public StatusException { + public: + explicit RestClientException(const std::string& message) + : StatusException("RestClient", message) { + } +}; + +class RestClientDisabledException : public RestClientException { + public: + explicit RestClientDisabledException() + : RestClientException( + "Cannot use rest client; serialization not enabled.") { + } +}; #ifdef TILEDB_SERIALIZATION @@ -347,26 +361,25 @@ Status RestClient::post_array_schema_to_rest( return sc; } -Status RestClient::post_array_from_rest( - const URI& uri, StorageManager* storage_manager, Array* array) { +void RestClient::post_array_from_rest( + const URI& uri, ContextResources& resources, Array* array) { if (array == nullptr) { - return LOG_STATUS(Status_SerializationError( - "Error getting remote array; array is null.")); + throw RestClientException("Error getting remote array; array is null."); } Buffer buff; - RETURN_NOT_OK( + throw_if_not_ok( serialization::array_open_serialize(*array, serialization_type_, &buff)); // Wrap in a list BufferList serialized; - RETURN_NOT_OK(serialized.add_buffer(std::move(buff))); + throw_if_not_ok(serialized.add_buffer(std::move(buff))); // Init curl and form the URL Curl curlc(logger_); std::string array_ns, array_uri; - RETURN_NOT_OK(uri.get_rest_components(&array_ns, &array_uri)); + throw_if_not_ok(uri.get_rest_components(&array_ns, &array_uri)); const std::string cache_key = array_ns + ":" + array_uri; - RETURN_NOT_OK( + throw_if_not_ok( curlc.init(config_, extra_headers_, &redirect_meta_, &redirect_mtx_)); std::string url = redirect_uri(cache_key) + "/v2/arrays/" + array_ns + "/" + curlc.url_escape(array_uri) + "/?"; @@ -377,25 +390,22 @@ Status RestClient::post_array_from_rest( // Get the data Buffer returned_data; - RETURN_NOT_OK(curlc.post_data( + throw_if_not_ok(curlc.post_data( stats_, url, serialization_type_, &serialized, &returned_data, cache_key)); - if (returned_data.data() == nullptr || returned_data.size() == 0) - return LOG_STATUS(Status_RestError( - "Error getting array from REST; server returned no data.")); + if (returned_data.data() == nullptr || returned_data.size() == 0) { + throw RestClientException( + "Error getting array from REST; server returned no data."); + } // Ensure data has a null delimiter for cap'n proto if using JSON - RETURN_NOT_OK(ensure_json_null_delimited_string(&returned_data)); - return serialization::array_deserialize( - array, - serialization_type_, - returned_data, - storage_manager, - memory_tracker_); + throw_if_not_ok(ensure_json_null_delimited_string(&returned_data)); + serialization::array_deserialize( + array, serialization_type_, returned_data, resources, memory_tracker_); } void RestClient::delete_array_from_rest(const URI& uri) { @@ -1654,13 +1664,11 @@ Status RestClient::init( ThreadPool*, const std::shared_ptr&, ContextResources&) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::set_header(const std::string&, const std::string&) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } tuple>> @@ -1672,40 +1680,33 @@ RestClient::get_array_schema_from_rest(const URI&) { } Status RestClient::post_array_schema_to_rest(const URI&, const ArraySchema&) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } -Status RestClient::post_array_from_rest(const URI&, StorageManager*, Array*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); +void RestClient::post_array_from_rest(const URI&, ContextResources&, Array*) { + throw RestClientDisabledException(); } void RestClient::delete_array_from_rest(const URI&) { - throw StatusException( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } void RestClient::post_delete_fragments_to_rest( const URI&, Array*, uint64_t, uint64_t) { - throw StatusException( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } void RestClient::post_delete_fragments_list_to_rest( const URI&, Array*, const std::vector&) { - throw StatusException( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::deregister_array_from_rest(const URI&) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::get_array_non_empty_domain(Array*, uint64_t, uint64_t) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::get_array_max_buffer_sizes( @@ -1713,20 +1714,17 @@ Status RestClient::get_array_max_buffer_sizes( const ArraySchema&, const void*, std::unordered_map>*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::get_array_metadata_from_rest( const URI&, uint64_t, uint64_t, Array*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::post_array_metadata_to_rest( const URI&, uint64_t, uint64_t, Array*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } std::vector> @@ -1737,37 +1735,32 @@ RestClient::post_enumerations_from_rest( Array*, const std::vector&, shared_ptr) { - throw Status_RestError("Cannot use rest client; serialization not enabled."); + throw RestClientDisabledException(); } void RestClient::post_query_plan_from_rest(const URI&, Query&, QueryPlan&) { - throw Status_RestError("Cannot use rest client; serialization not enabled."); + throw RestClientDisabledException(); } Status RestClient::submit_query_to_rest(const URI&, Query*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::finalize_query_to_rest(const URI&, Query*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::submit_and_finalize_query_to_rest(const URI&, Query*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::get_query_est_result_sizes(const URI&, Query*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::post_array_schema_evolution_to_rest( const URI&, ArraySchemaEvolution*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } tuple> RestClient::check_array_exists_from_rest( @@ -1787,58 +1780,47 @@ tuple> RestClient::check_group_exists_from_rest( } Status RestClient::post_group_metadata_from_rest(const URI&, Group*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::post_fragment_info_from_rest(const URI&, FragmentInfo*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::put_group_metadata_to_rest(const URI&, Group*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::post_group_create_to_rest(const URI&, Group*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::post_group_from_rest(const URI&, Group*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::patch_group_to_rest(const URI&, Group*) { - return LOG_STATUS( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } void RestClient::delete_group_from_rest(const URI&, bool) { - throw StatusException( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::post_consolidation_to_rest(const URI&, const Config&) { - throw StatusException( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } Status RestClient::post_vacuum_to_rest(const URI&, const Config&) { - throw StatusException( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } std::vector> RestClient::post_consolidation_plan_from_rest( const URI&, const Config&, uint64_t) { - throw StatusException( - Status_RestError("Cannot use rest client; serialization not enabled.")); + throw RestClientDisabledException(); } #endif // TILEDB_SERIALIZATION -} // namespace sm -} // namespace tiledb +} // namespace tiledb::sm diff --git a/tiledb/sm/rest/rest_client.h b/tiledb/sm/rest/rest_client.h index 3c03328127f..72fb1ad20df 100644 --- a/tiledb/sm/rest/rest_client.h +++ b/tiledb/sm/rest/rest_client.h @@ -5,7 +5,7 @@ * * The MIT License * - * @copyright Copyright (c) 2018-2023 TileDB, Inc. + * @copyright Copyright (c) 2018-2024 TileDB, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -44,8 +44,7 @@ using namespace tiledb::common; -namespace tiledb { -namespace sm { +namespace tiledb::sm { class ArraySchema; class ArraySchemaEvolution; @@ -130,11 +129,11 @@ class RestClient { * Post the array config and get an array from rest server * * @param uri of array being loaded - * @param storage_manager storage manager of array being loaded + * @param resources the context resources * @param array array to load into */ - Status post_array_from_rest( - const URI& uri, StorageManager* storage_manager, Array* array); + void post_array_from_rest( + const URI& uri, ContextResources& resources, Array* array); /** * Post a data array schema to rest server @@ -569,7 +568,6 @@ class RestClient { Status ensure_json_null_delimited_string(Buffer* buffer); }; -} // namespace sm -} // namespace tiledb +} // namespace tiledb::sm #endif // TILEDB_REST_CLIENT_H diff --git a/tiledb/sm/serialization/array.cc b/tiledb/sm/serialization/array.cc index 72c6a1c142e..602132df68b 100644 --- a/tiledb/sm/serialization/array.cc +++ b/tiledb/sm/serialization/array.cc @@ -64,6 +64,14 @@ class ArraySerializationException : public StatusException { } }; +class ArraySerializationDisabledException : public ArraySerializationException { + public: + explicit ArraySerializationDisabledException() + : ArraySerializationException( + "Cannot (de)serialize; serialization not enabled.") { + } +}; + #ifdef TILEDB_SERIALIZATION Status metadata_to_capnp( @@ -223,9 +231,9 @@ Status array_to_capnp( return Status::Ok(); } -Status array_from_capnp( +void array_from_capnp( const capnp::Array::Reader& array_reader, - StorageManager* storage_manager, + ContextResources& resources, Array* array, const bool client_side, shared_ptr memory_tracker) { @@ -240,7 +248,7 @@ Status array_from_capnp( if (array_reader.hasQueryType()) { auto query_type_str = array_reader.getQueryType(); QueryType query_type = QueryType::READ; - RETURN_NOT_OK(query_type_enum(query_type_str, &query_type)); + throw_if_not_ok(query_type_enum(query_type_str, &query_type)); array->set_query_type(query_type); array->set_timestamps( @@ -286,13 +294,10 @@ Status array_from_capnp( if (array_reader.hasArrayDirectory()) { const auto& array_directory_reader = array_reader.getArrayDirectory(); auto array_dir = array_directory_from_capnp( - array_directory_reader, - storage_manager->resources(), - array->array_uri()); + array_directory_reader, resources, array->array_uri()); array->set_array_directory(std::move(*array_dir)); } else { - array->set_array_directory( - ArrayDirectory(storage_manager->resources(), array->array_uri())); + array->set_array_directory(ArrayDirectory(resources, array->array_uri())); } if (array_reader.hasFragmentMetadataAll()) { @@ -302,8 +307,8 @@ Status array_from_capnp( fragment_metadata.reserve(fragment_metadata_all_reader.size()); for (auto frag_meta_reader : fragment_metadata_all_reader) { auto meta = make_shared( - HERE(), &storage_manager->resources(), array->memory_tracker()); - RETURN_NOT_OK(fragment_metadata_from_capnp( + HERE(), &resources, array->memory_tracker()); + throw_if_not_ok(fragment_metadata_from_capnp( array->array_schema_latest_ptr(), frag_meta_reader, meta)); if (client_side) { meta->set_rtree_loaded(); @@ -316,19 +321,17 @@ Status array_from_capnp( if (array_reader.hasNonEmptyDomain()) { const auto& nonempty_domain_reader = array_reader.getNonEmptyDomain(); // Deserialize - RETURN_NOT_OK( + throw_if_not_ok( utils::deserialize_non_empty_domain(nonempty_domain_reader, array)); array->set_non_empty_domain_computed(true); } if (array_reader.hasArrayMetadata()) { const auto& array_metadata_reader = array_reader.getArrayMetadata(); - RETURN_NOT_OK( + throw_if_not_ok( metadata_from_capnp(array_metadata_reader, array->unsafe_metadata())); array->set_metadata_loaded(true); } - - return Status::Ok(); } Status array_open_to_capnp( @@ -533,11 +536,11 @@ Status array_serialize( return Status::Ok(); } -Status array_deserialize( +void array_deserialize( Array* array, SerializationType serialize_type, const Buffer& serialized_buffer, - StorageManager* storage_manager, + ContextResources& resources, shared_ptr memory_tracker) { try { switch (serialize_type) { @@ -550,13 +553,12 @@ Status array_deserialize( kj::StringPtr(static_cast(serialized_buffer.data())), array_builder); capnp::Array::Reader array_reader = array_builder.asReader(); - RETURN_NOT_OK(array_from_capnp( - array_reader, storage_manager, array, true, memory_tracker)); + array_from_capnp(array_reader, resources, array, true, memory_tracker); break; } case SerializationType::CAPNP: { // Set traversal limit from config - uint64_t limit = storage_manager->config() + uint64_t limit = resources.config() .get("rest.capnp_traversal_limit") .value(); ::capnp::ReaderOptions readerOptions; @@ -571,27 +573,23 @@ Status array_deserialize( serialized_buffer.size() / sizeof(::capnp::word)), readerOptions); capnp::Array::Reader array_reader = reader.getRoot(); - RETURN_NOT_OK(array_from_capnp( - array_reader, storage_manager, array, true, memory_tracker)); + array_from_capnp(array_reader, resources, array, true, memory_tracker); break; } default: { - return LOG_STATUS(Status_SerializationError( - "Error deserializing array; Unknown serialization type " - "passed")); + throw ArraySerializationException( + "Error deserializing array; Unknown serialization type passed"); } } } catch (kj::Exception& e) { - return LOG_STATUS(Status_SerializationError( + throw ArraySerializationException( "Error deserializing array; kj::Exception: " + - std::string(e.getDescription().cStr()))); + std::string(e.getDescription().cStr())); } catch (std::exception& e) { - return LOG_STATUS(Status_SerializationError( - "Error deserializing array; exception " + std::string(e.what()))); + throw ArraySerializationException( + "Error deserializing array; exception " + std::string(e.what())); } - - return Status::Ok(); } Status array_open_serialize( @@ -704,34 +702,30 @@ Status array_serialize(Array*, SerializationType, Buffer*, const bool) { "Cannot serialize; serialization not enabled.")); } -Status array_deserialize( +void array_deserialize( Array*, SerializationType, const Buffer&, - StorageManager*, + ContextResources&, shared_ptr) { - return LOG_STATUS(Status_SerializationError( - "Cannot deserialize; serialization not enabled.")); + throw ArraySerializationDisabledException(); } Status array_open_serialize(const Array&, SerializationType, Buffer*) { - return LOG_STATUS(Status_SerializationError( - "Cannot serialize; serialization not enabled.")); + throw ArraySerializationDisabledException(); } Status array_open_deserialize(Array*, SerializationType, const Buffer&) { - return LOG_STATUS(Status_SerializationError( - "Cannot deserialize; serialization not enabled.")); + throw ArraySerializationDisabledException(); + ; } Status metadata_serialize(Metadata*, SerializationType, Buffer*) { - return LOG_STATUS(Status_SerializationError( - "Cannot serialize; serialization not enabled.")); + throw ArraySerializationDisabledException(); } Status metadata_deserialize(Metadata*, SerializationType, const Buffer&) { - return LOG_STATUS(Status_SerializationError( - "Cannot deserialize; serialization not enabled.")); + throw ArraySerializationDisabledException(); } #endif // TILEDB_SERIALIZATION diff --git a/tiledb/sm/serialization/array.h b/tiledb/sm/serialization/array.h index e048510c534..4f7f4fc1111 100644 --- a/tiledb/sm/serialization/array.h +++ b/tiledb/sm/serialization/array.h @@ -69,7 +69,7 @@ Status array_to_capnp( /** * Deserialize an Array from Cap'n proto * @param array_reader cap'n proto class - * @param storage_manager the storage manager associated with the array + * @param resources the context resources associated with the array * @param array Array to deserialize into * @param client_side Allows to specify different behavior depending on who is * @param memory_tracker Memory tracker to use for memory allocations. @@ -78,9 +78,9 @@ Status array_to_capnp( * @param memory_tracker Memory tracker to use on the deserialized object. * @return Status */ -Status array_from_capnp( +void array_from_capnp( const capnp::Array::Reader& array_reader, - StorageManager* storage_manager, + ContextResources& resources, Array* array, const bool client_side, shared_ptr memory_tracker); @@ -134,11 +134,20 @@ Status array_serialize( Buffer* serialized_buffer, const bool client_side); -Status array_deserialize( +/** + * Deserialize an array via Cap'n Proto. + * + * @param array array object to set the array details into + * @param serialize_type format the data is serialized in: Cap'n Proto of JSON + * @param serialized_buffer buffer to read serialized bytes from + * @param resources the context resources associated with the array + * @param memory_tracker the memory tracker to use on the deserialized object + */ +void array_deserialize( Array* array, SerializationType serialize_type, const Buffer& serialized_buffer, - StorageManager* storage_manager, + ContextResources& resources, shared_ptr memory_tracker); /** diff --git a/tiledb/sm/serialization/query.cc b/tiledb/sm/serialization/query.cc index 2f76659e335..c95d5d3ef8a 100644 --- a/tiledb/sm/serialization/query.cc +++ b/tiledb/sm/serialization/query.cc @@ -5,7 +5,7 @@ * * The MIT License * - * @copyright Copyright (c) 2017-2023 TileDB, Inc. + * @copyright Copyright (c) 2017-2024 TileDB, Inc. * @copyright Copyright (c) 2016 MIT and Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -80,9 +80,7 @@ using namespace tiledb::common; using namespace tiledb::sm::stats; -namespace tiledb { -namespace sm { -namespace serialization { +namespace tiledb::sm::serialization { #ifdef TILEDB_SERIALIZATION @@ -2297,12 +2295,12 @@ Status array_from_query_deserialize( query_builder); capnp::Query::Reader query_reader = query_builder.asReader(); // Deserialize array instance. - RETURN_NOT_OK(array_from_capnp( + array_from_capnp( query_reader.getArray(), - storage_manager, + storage_manager->resources(), &array, false, - memory_tracker)); + memory_tracker); break; } case SerializationType::CAPNP: { @@ -2329,12 +2327,12 @@ Status array_from_query_deserialize( capnp::Query::Reader query_reader = reader.getRoot(); // Deserialize array instance. - RETURN_NOT_OK(array_from_capnp( + array_from_capnp( query_reader.getArray(), - storage_manager, + storage_manager->resources(), &array, false, - memory_tracker)); + memory_tracker); break; } default: @@ -3219,6 +3217,4 @@ Status query_est_result_size_deserialize( #endif // TILEDB_SERIALIZATION -} // namespace serialization -} // namespace sm -} // namespace tiledb +} // namespace tiledb::sm::serialization