diff --git a/src/core/compact_object.cc b/src/core/compact_object.cc index 5c19a308457b..d30f6f44cf64 100644 --- a/src/core/compact_object.cc +++ b/src/core/compact_object.cc @@ -20,8 +20,6 @@ extern "C" { #include #include -#include - #include "base/flags.h" #include "base/logging.h" #include "base/pod_array.h" diff --git a/src/core/compact_object_test.cc b/src/core/compact_object_test.cc index 5fbb4cddb690..207e67f1cfd4 100644 --- a/src/core/compact_object_test.cc +++ b/src/core/compact_object_test.cc @@ -7,8 +7,6 @@ #include #include -#include -#include #include #include "base/gtest.h" diff --git a/src/core/json/json_object.h b/src/core/json/json_object.h index f34449ca63a2..8b82d3b0884c 100644 --- a/src/core/json/json_object.h +++ b/src/core/json/json_object.h @@ -4,6 +4,13 @@ #pragma once +#include // for __cpp_lib_to_chars macro. + +// std::from_chars is available in C++17 if __cpp_lib_to_chars is defined. +#if __cpp_lib_to_chars >= 201611L +#define JSONCONS_HAS_STD_FROM_CHARS 1 +#endif + #include #include #include diff --git a/src/server/cluster/cluster_config.cc b/src/server/cluster/cluster_config.cc index 05995df56843..ae5bb331a254 100644 --- a/src/server/cluster/cluster_config.cc +++ b/src/server/cluster/cluster_config.cc @@ -2,7 +2,6 @@ #include -#include #include #include diff --git a/src/server/json_family.cc b/src/server/json_family.cc index f5e2367a253b..050090440b22 100644 --- a/src/server/json_family.cc +++ b/src/server/json_family.cc @@ -9,12 +9,6 @@ #include #include -#include -#include -#include -#include -#include - #include "absl/cleanup/cleanup.h" #include "base/flags.h" #include "base/logging.h" @@ -36,6 +30,12 @@ #include "server/tiered_storage.h" #include "server/transaction.h" +// clang-format off +#include +#include +#include +// clang-format on + ABSL_FLAG(bool, jsonpathv2, true, "If true uses Dragonfly jsonpath implementation, " "otherwise uses legacy jsoncons implementation."); diff --git a/src/server/json_family_test.cc b/src/server/json_family_test.cc index bcc341ca2988..78c34716c186 100644 --- a/src/server/json_family_test.cc +++ b/src/server/json_family_test.cc @@ -6,8 +6,6 @@ #include -#include - #include "base/gtest.h" #include "base/logging.h" #include "facade/facade_test.h" diff --git a/src/server/search/doc_accessors.cc b/src/server/search/doc_accessors.cc index a7f02f00e906..1e2c01c83a20 100644 --- a/src/server/search/doc_accessors.cc +++ b/src/server/search/doc_accessors.cc @@ -12,8 +12,6 @@ #include #include -#include - #include "base/flags.h" #include "core/json/path.h" #include "core/overloaded.h" @@ -86,7 +84,7 @@ SearchDocData BaseAccessor::Serialize(const search::Schema& schema, for (const auto& field : fields) { const auto& fident = field.GetIdentifier(schema, false); const auto& fname = field.GetShortName(schema); - + auto field_value = ExtractSortableValue(schema, fident, absl::StrJoin(GetStrings(fident).value(), ",")); if (field_value) { diff --git a/src/server/test_utils.cc b/src/server/test_utils.cc index 42608fce56ad..c485246e47f2 100644 --- a/src/server/test_utils.cc +++ b/src/server/test_utils.cc @@ -243,6 +243,7 @@ void BaseFamilyTest::ResetService() { absl::SetFlag(&FLAGS_alsologtostderr, true); fb2::Mutex m; shard_set->pool()->AwaitFiberOnAll([&m](unsigned index, ProactorBase* base) { + ThisFiber::SetName("Watchdog"); std::unique_lock lk(m); LOG(ERROR) << "Proactor " << index << ":\n"; fb2::detail::FiberInterface::PrintAllFiberStackTraces(); @@ -359,7 +360,10 @@ bool BaseFamilyTest::WaitUntilCondition(std::function condition_cb, RespExpr BaseFamilyTest::Run(ArgSlice list) { if (!ProactorBase::IsProactorThread()) { - return pp_->at(0)->Await([&] { return this->Run(list); }); + return pp_->at(0)->Await([&] { + ThisFiber::SetName("Test::Run"); + return this->Run(list); + }); } return Run(GetId(), list);