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

build: Remove some adherence to folly #1144

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cpp/arcticdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ set(arcticdb_srcs
util/ref_counted_map.hpp
util/ref_counted_map.hpp
util/regex_filter.hpp
util/shared_future.hpp
util/simple_string_hash.hpp
util/slab_allocator.hpp
util/sparse_utils.hpp
Expand Down
6 changes: 4 additions & 2 deletions cpp/arcticdb/entity/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
#include <arcticdb/entity/metrics.hpp>
#include <arcticdb/log/log.hpp>
#include <arcticdb/util/preconditions.hpp>
#include <folly/system/ThreadName.h>
#include <folly/container/F14Map.h>
#include <arcticdb/util/preprocess.hpp>
#include <arcticdb/util/pb_util.hpp>

#ifdef _WIN32
# include <Winsock.h> // for gethostname
#endif

using namespace prometheus;

namespace arcticdb {
Expand Down
8 changes: 1 addition & 7 deletions cpp/arcticdb/entity/performance_tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
*
* As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0.
*/
#if defined(USE_REMOTERY)

#include <arcticdb/entity/performance_tracing.hpp>
#include <folly/Singleton.h>
#include <arcticdb/log/log.hpp>
#include <folly/system/ThreadName.h>
#include <folly/container/F14Map.h>
#include <arcticdb/util/preprocess.hpp>
#include <arcticdb/util/pb_util.hpp>

#if defined(USE_REMOTERY)

std::shared_ptr<RemoteryInstance> RemoteryInstance::instance(){
std::call_once(RemoteryInstance::init_flag_, &RemoteryInstance::init);
return RemoteryInstance::instance_;
Expand Down Expand Up @@ -61,8 +59,6 @@ RemoteryInstance::~RemoteryInstance() {
}
}

#endif

namespace arcticdb::detail {
struct ThreadNameCache {
folly::F14FastMap<const char *, std::string> fqn_by_task_name_;
Expand All @@ -80,8 +76,6 @@ namespace arcticdb::detail {
};
}

#ifdef USE_REMOTERY

void set_remotery_thread_name(const char* task_name){
static thread_local arcticdb::detail::ThreadNameCache tnc;
auto name = tnc.get_thread_name(task_name);
Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/pipeline/read_frame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <arcticdb/pipeline/pipeline_context.hpp>
#include <arcticdb/pipeline/read_options.hpp>
#include <arcticdb/util/bitset.hpp>
#include <arcticdb/util/shared_future.hpp>
#include <arcticdb/util/buffer_holder.hpp>

#include <folly/futures/Future.h>
Expand Down
9 changes: 2 additions & 7 deletions cpp/arcticdb/python/python_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ enum class LoggerId {
SNAPSHOT
};

void initialize_folly() {
//folly::SingletonVault::singleton()->registrationComplete();
auto programName ="__arcticdb_logger__";
google::InitGoogleLogging(programName);
}

void register_log(py::module && log) {
log.def("configure", [](const py::object & py_log_conf, bool force=false){
arcticdb::proto::logger::LoggersConfig config;
Expand Down Expand Up @@ -307,7 +301,8 @@ PYBIND11_MODULE(arcticdb_ext, m) {

Top level package of ArcticDB extension plugin.
)pbdoc";
initialize_folly();
auto programName ="__arcticdb_logger__";
google::InitGoogleLogging(programName);
#ifndef WIN32
// No fork() in Windows, so no need to register the handler
pthread_atfork(nullptr, nullptr, &SingleThreadMutexHolder::reset_mutex);
Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/storage/azure/azure_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <azure/storage/blobs.hpp>

#include <boost/interprocess/streams/bufferstream.hpp>
#include <folly/ThreadLocal.h>

#undef GetMessage

Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/storage/library_path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include <folly/small_vector.h>
#include <folly/Range.h>
#include <folly/String.h>
#include <fmt/format.h>
#include <memory>
#include <string>
Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/storage/lmdb/lmdb_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include <arcticdb/entity/protobufs.hpp>

#include <folly/String.h>
#include <folly/Range.h>
#include <arcticdb/util/composite.hpp>

Expand Down
2 changes: 0 additions & 2 deletions cpp/arcticdb/storage/mongo/mongo_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <arcticdb/storage/mongo/mongo_instance.hpp>

#include <folly/Singleton.h>

namespace arcticdb::storage::mongo {

void MongoInstance::init() {
Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/storage/s3/detail-inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <aws/s3/model/ObjectIdentifier.h>

#include <boost/interprocess/streams/bufferstream.hpp>
#include <folly/ThreadLocal.h>

#undef GetMessage

Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/storage/s3/s3_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

#include <arcticdb/storage/s3/s3_api.hpp>
#include <folly/Singleton.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/logging/DefaultLogSystem.h>
#include <aws/core/utils/logging/AWSLogging.h>
Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/storage/s3/s3_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <aws/s3/model/ObjectIdentifier.h>

#include <boost/interprocess/streams/bufferstream.hpp>
#include <folly/ThreadLocal.h>

#include <arcticdb/storage/s3/detail-inl.hpp>

Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/util/configs_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

#include <arcticdb/util/configs_map.hpp>
#include <folly/Singleton.h>

namespace arcticdb {

Expand Down
40 changes: 0 additions & 40 deletions cpp/arcticdb/util/shared_future.hpp

This file was deleted.

1 change: 0 additions & 1 deletion cpp/arcticdb/util/storage_lock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <arcticdb/util/exponential_backoff.hpp>
#include <arcticdb/util/configs_map.hpp>

#include <folly/portability/PThread.h>
#include <folly/system/ThreadId.h>

#include <mutex>
Expand Down
1 change: 0 additions & 1 deletion cpp/arcticdb/version/test/test_version_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <filesystem>
#include <chrono>
#include <thread>
#include <folly/futures/Barrier.h>

struct VersionStoreTest : arcticdb::TestStore {
protected:
Expand Down
11 changes: 0 additions & 11 deletions cpp/arcticdb/version/version_store_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
#include <arcticdb/entity/read_result.hpp>
#include <arcticdb/version/version_log.hpp>

#include <folly/futures/Barrier.h>

#include <type_traits>
#include <iostream>

Expand Down Expand Up @@ -325,15 +323,6 @@ class PythonVersionStore : public LocalVersionedEngine {

void fix_symbol_trees(const std::vector<StreamId>& symbols);

/**
* Main business logic of the DeleteTombstonedData background job. Delete tombstoned versions and snapshots.
* @param limit_stream_id Test-specific. If non-empty, limit scope to tombstoned versions in the given stream.
* @param min_age_sec Minimum age of index keys that can be deleted in unit of seconds.
* @param stresser_sync Only used by stress tests to synchronise steps.
*/
void delete_tombstones(const std::string& limit_stream_id, bool dry_run, uint64_t min_age_sec,
folly::futures::Barrier* stresser_sync = nullptr, size_t batch_size = 2000);

std::unordered_map<VersionId, bool> get_all_tombstoned_versions(const StreamId &stream_id);

std::vector<SliceAndKey> list_incompletes(const StreamId& stream_id);
Expand Down
Loading