Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to storages to support async reads #2012

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

willdealtry
Copy link
Collaborator

Wrap the storage methods in an async interface, add methods that return KeySegmentPairs directly, get rid of composite from the storage interface

@willdealtry willdealtry changed the title WIP Refactor to async Refactor to storages to support async reads Dec 10, 2024
@willdealtry willdealtry force-pushed the refactor_to_async branch 2 times, most recently from 0c6203a to 9a33876 Compare December 10, 2024 18:11
@willdealtry willdealtry marked this pull request as ready for review December 11, 2024 10:02
@@ -244,11 +244,13 @@ std::vector<EntityId> push_entities(ComponentManager& component_manager, Process

std::vector<EntityId> flatten_entities(std::vector<std::vector<EntityId>>&& entity_ids_vec);

std::vector<folly::FutureSplitter<pipelines::SegmentAndSlice>> split_futures(
std::vector<folly::Future<pipelines::SegmentAndSlice>>&& segment_and_slice_futures);
std::vector<std::variant<folly::Future<pipelines::SegmentAndSlice>, folly::FutureSplitter<pipelines::SegmentAndSlice>>> split_futures(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FutureOrSplitter

@@ -106,7 +105,7 @@ void iterate_snapshots(const std::shared_ptr<Store>& store, folly::Function<void
try {
visitor(vk);
} catch (storage::KeyNotFoundException& e) {
e.keys().broadcast([&vk, &e](const VariantKey& key) {
std::for_each(e.keys().begin(), e.keys().end(), [&vk, &e](const VariantKey& key) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use std::ranges

#include "arcticdb/storage/storage_utils.hpp"
#include "arcticdb/storage/azure/azure_client_interface.hpp"
#include "azure_mock_client.hpp"
#include "arcticdb/storage/object_store_utils.hpp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: angle brackets

#include "arcticdb/entity/atom_key.hpp"
#include "arcticdb/entity/serialized_key.hpp"
#include "arcticdb/util/string_utils.hpp"
#include "arcticdb/storage/lmdb/lmdb.hpp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: angle brackets

@@ -22,6 +22,7 @@ S3ApiInstance::S3ApiInstance(Aws::Utils::Logging::LogLevel log_level) :
// Use correct URI encoding rather than legacy compat one in AWS SDK. PURE S3 needs this to handle symbol names
// that have special characters (eg ':').
options_.httpOptions.compliantRfc3986Encoding = true;
//options_.httpOptions.httpClientFactory_create_fn = [](){ return Aws::MakeShared<ArcticHttpClientFactory>("ARCTICDB_HTTP_CLIENT"); };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess remove the comment if not checking in ArcticHttpClientFactory

{
std::lock_guard lock{mutex_};
++data_[trace];
++count_;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants