aboutsummaryrefslogtreecommitdiffstats
path: root/yt
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2024-01-04 15:09:05 +0100
committerGitHub <noreply@github.com>2024-01-04 15:09:05 +0100
commitdab291146f6cd7d35684e3a1150e5bb1c412982c (patch)
tree36ef35f6cacb6432845a4a33f940c95871036b32 /yt
parent63660ad5e7512029fd0218e7a636580695a24e1f (diff)
downloadydb-dab291146f6cd7d35684e3a1150e5bb1c412982c.tar.gz
Library import 5, delete go dependencies (#832)
* Library import 5, delete go dependencies * Fix yt client
Diffstat (limited to 'yt')
-rw-r--r--yt/cpp/mapreduce/interface/serialize.cpp4
-rw-r--r--yt/python/yt/common.py12
-rw-r--r--yt/yt/client/api/operation_client.cpp6
-rw-r--r--yt/yt/client/api/persistent_queue.cpp14
-rw-r--r--yt/yt/client/api/rowset.cpp2
-rw-r--r--yt/yt/client/api/rpc_proxy/client_base.cpp6
-rw-r--r--yt/yt/client/api/rpc_proxy/client_impl.cpp4
-rw-r--r--yt/yt/client/api/rpc_proxy/connection_impl.cpp6
-rw-r--r--yt/yt/client/api/rpc_proxy/row_stream.cpp2
-rw-r--r--yt/yt/client/api/rpc_proxy/table_mount_cache.cpp1
-rw-r--r--yt/yt/client/api/rpc_proxy/transaction_impl.cpp2
-rw-r--r--yt/yt/client/api/transaction.cpp2
-rw-r--r--yt/yt/client/arrow/arrow_row_stream_encoder.cpp15
-rw-r--r--yt/yt/client/chaos_client/replication_card.cpp2
-rw-r--r--yt/yt/client/chunk_client/data_statistics.cpp2
-rw-r--r--yt/yt/client/chunk_client/read_limit.cpp7
-rw-r--r--yt/yt/client/complex_types/yson_format_conversion.cpp3
-rw-r--r--yt/yt/client/driver/etc_commands.cpp3
-rw-r--r--yt/yt/client/driver/queue_commands.cpp9
-rw-r--r--yt/yt/client/driver/queue_commands.h1
-rw-r--r--yt/yt/client/driver/table_commands.cpp1
-rw-r--r--yt/yt/client/hedging/hedging_executor.cpp12
-rw-r--r--yt/yt/client/hedging/hedging_executor.h9
-rw-r--r--yt/yt/client/node_tracker_client/node_directory.cpp2
-rw-r--r--yt/yt/client/queue_client/consumer_client.cpp279
-rw-r--r--yt/yt/client/queue_client/consumer_client.h22
-rw-r--r--yt/yt/client/queue_client/helpers.cpp95
-rw-r--r--yt/yt/client/queue_client/helpers.h31
-rw-r--r--yt/yt/client/queue_client/partition_reader.cpp18
-rw-r--r--yt/yt/client/scheduler/public.h2
-rw-r--r--yt/yt/client/table_client/columnar.cpp10
-rw-r--r--yt/yt/client/table_client/schema.cpp2
-rw-r--r--yt/yt/client/table_client/unittests/columnar_ut.cpp130
-rw-r--r--yt/yt/client/table_client/unittests/helpers/helpers.cpp2
-rw-r--r--yt/yt/client/table_client/validate_logical_type.cpp2
-rw-r--r--yt/yt/client/table_client/value_consumer.h2
-rw-r--r--yt/yt/client/table_client/wire_protocol.cpp5
-rw-r--r--yt/yt/client/tablet_client/config.cpp2
-rw-r--r--yt/yt/client/tablet_client/table_mount_cache_detail.cpp4
-rw-r--r--yt/yt/client/transaction_client/batching_timestamp_provider.cpp2
-rw-r--r--yt/yt/client/transaction_client/helpers.cpp2
-rw-r--r--yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp10
-rw-r--r--yt/yt/client/unittests/replication_progress_ut.cpp100
-rw-r--r--yt/yt/client/unittests/schema_ut.cpp2
-rw-r--r--yt/yt/client/unittests/validate_logical_type_ut.cpp4
-rw-r--r--yt/yt/client/unittests/ypath_ut.cpp6
-rw-r--r--yt/yt/client/ya.make1
-rw-r--r--yt/yt/core/actions/future-inl.h6
-rw-r--r--yt/yt/core/actions/signal-inl.h2
-rw-r--r--yt/yt/core/compression/zstd.cpp2
-rw-r--r--yt/yt/core/concurrency/action_queue.cpp8
-rw-r--r--yt/yt/core/concurrency/coroutine-inl.h4
-rw-r--r--yt/yt/core/concurrency/new_fair_share_thread_pool.cpp4
-rw-r--r--yt/yt/core/concurrency/nonblocking_batcher-inl.h2
-rw-r--r--yt/yt/core/concurrency/unittests/scheduler_ut.cpp8
-rw-r--r--yt/yt/core/crypto/tls.cpp4
-rw-r--r--yt/yt/core/http/stream.cpp2
-rw-r--r--yt/yt/core/logging/log_manager.cpp2
-rw-r--r--yt/yt/core/logging/unittests/logging_ut.cpp16
-rw-r--r--yt/yt/core/misc/checksum.cpp2
-rw-r--r--yt/yt/core/misc/error-inl.h7
-rw-r--r--yt/yt/core/misc/error.h4
-rw-r--r--yt/yt/core/misc/protobuf_helpers-inl.h2
-rw-r--r--yt/yt/core/misc/statistics-inl.h6
-rw-r--r--yt/yt/core/misc/unittests/arithmetic_formula_ut.cpp128
-rw-r--r--yt/yt/core/misc/unittests/async_slru_cache_ut.cpp8
-rw-r--r--yt/yt/core/misc/unittests/boolean_formula_ut.cpp50
-rw-r--r--yt/yt/core/misc/unittests/concurrent_cache_ut.cpp6
-rw-r--r--yt/yt/core/misc/unittests/hyperloglog_ut.cpp2
-rw-r--r--yt/yt/core/misc/unittests/time_formula_ut.cpp28
-rw-r--r--yt/yt/core/net/connection.cpp4
-rw-r--r--yt/yt/core/net/listener.cpp2
-rw-r--r--yt/yt/core/net/socket.cpp4
-rw-r--r--yt/yt/core/rpc/dynamic_channel_pool.cpp6
-rw-r--r--yt/yt/core/rpc/grpc/channel.cpp8
-rw-r--r--yt/yt/core/rpc/protocol_version.cpp2
-rw-r--r--yt/yt/core/rpc/response_keeper.cpp2
-rw-r--r--yt/yt/core/rpc/service_detail.cpp10
-rw-r--r--yt/yt/core/rpc/viable_peer_registry.cpp6
-rw-r--r--yt/yt/core/test_framework/framework.h4
-rw-r--r--yt/yt/core/tracing/trace_context.h2
-rw-r--r--yt/yt/core/ypath/unittests/tokenizer_ut.cpp2
-rw-r--r--yt/yt/core/yson/protobuf_interop.cpp12
-rw-r--r--yt/yt/core/ytree/helpers.cpp2
-rw-r--r--yt/yt/core/ytree/unittests/serialize_ut.cpp10
-rw-r--r--yt/yt/core/ytree/virtual.cpp2
-rw-r--r--yt/yt/core/ytree/ypath_detail.cpp2
-rw-r--r--yt/yt/core/ytree/ypath_service.cpp6
-rw-r--r--yt/yt/library/erasure/impl/unittests/erasure_stability_ut.cpp12
-rw-r--r--yt/yt/library/formats/arrow_parser.cpp10
-rw-r--r--yt/yt/library/formats/arrow_writer.cpp26
-rw-r--r--yt/yt/library/formats/dsv_writer.cpp10
-rw-r--r--yt/yt/library/formats/protobuf.cpp8
-rw-r--r--yt/yt/library/formats/web_json_writer.cpp6
-rw-r--r--yt/yt/library/formats/yamr_parser_base.cpp2
-rw-r--r--yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp2
-rw-r--r--yt/yt/library/process/unittests/pipes_ut.cpp8
-rw-r--r--yt/yt/library/profiling/resource_tracker/resource_tracker.cpp2
-rw-r--r--yt/yt/library/query/base/public.h153
-rw-r--r--yt/yt/library/skiff_ext/schema_match.cpp8
-rw-r--r--yt/yt/library/tracing/jaeger/tracer.cpp2
101 files changed, 989 insertions, 509 deletions
diff --git a/yt/cpp/mapreduce/interface/serialize.cpp b/yt/cpp/mapreduce/interface/serialize.cpp
index 8e701d30b4..4ead9e9a7e 100644
--- a/yt/cpp/mapreduce/interface/serialize.cpp
+++ b/yt/cpp/mapreduce/interface/serialize.cpp
@@ -216,12 +216,12 @@ void Serialize(const TColumnSchema& columnSchema, NYson::IYsonConsumer* consumer
auto simplify = [&](const TNode& typeV3) -> TMaybe<std::pair<TString, bool>> {
auto simple = getSimple(typeV3);
if (simple) {
- return std::make_pair(*simple, isRequired(*simple));
+ return std::pair(*simple, isRequired(*simple));
}
if (typeV3.IsMap() && typeV3["type_name"] == "optional") {
auto simpleItem = getSimple(typeV3["item"]);
if (simpleItem && isRequired(*simpleItem)) {
- return std::make_pair(*simpleItem, false);
+ return std::pair(*simpleItem, false);
}
}
return {};
diff --git a/yt/python/yt/common.py b/yt/python/yt/common.py
index 5a3d3e201b..7943d0e86d 100644
--- a/yt/python/yt/common.py
+++ b/yt/python/yt/common.py
@@ -430,11 +430,15 @@ def _pretty_format_attribute(name, value, attribute_length_limit):
value = json.dumps(value, indent=2)
value = value.replace("\n", "\n" + " " * (15 + 1 + 4))
else:
- if isinstance(value, string_types):
- value = to_native_str(value)
+ # YsonStringProxy attribute formatting.
+ if hasattr(value, "_bytes"):
+ value = value._bytes
else:
- value = str(value)
- value = _pretty_format_escape(value)
+ if isinstance(value, string_types):
+ value = to_native_str(value)
+ else:
+ value = str(value)
+ value = _pretty_format_escape(value)
if attribute_length_limit is not None and len(value) > attribute_length_limit:
value = value[:attribute_length_limit] + "...message truncated..."
return " " * 4 + "%-15s %s" % (name, value)
diff --git a/yt/yt/client/api/operation_client.cpp b/yt/yt/client/api/operation_client.cpp
index b2f6420052..350e3ebfc5 100644
--- a/yt/yt/client/api/operation_client.cpp
+++ b/yt/yt/client/api/operation_client.cpp
@@ -87,15 +87,15 @@ void Deserialize(TOperation& operation, NYTree::IAttributeDictionaryPtr attribut
using T = std::remove_reference_t<decltype(field)>;
if constexpr (std::is_same_v<T, NYson::TYsonString>) {
if (auto value = attributes->FindYson(name)) {
- field = std::move(value);
- attributes->Remove(name);
+ field = std::move(value);
+ attributes->Remove(name);
} else {
field = {};
}
} else {
using TValue = typename TOptionalTraits<T>::TValue;
if (auto value = attributes->FindAndRemove<TValue>(name)) {
- field = std::move(value);
+ field = std::move(value);
} else {
field.reset();
}
diff --git a/yt/yt/client/api/persistent_queue.cpp b/yt/yt/client/api/persistent_queue.cpp
index fa3274b616..77d88ba1e5 100644
--- a/yt/yt/client/api/persistent_queue.cpp
+++ b/yt/yt/client/api/persistent_queue.cpp
@@ -95,6 +95,7 @@ public:
StateTablePath_,
TabletIndexes_);
+ PollExecutors_.reserve(TabletIndexes_.size());
for (int tabletIndex : TabletIndexes_) {
auto executor = New<TPeriodicExecutor>(
Invoker_,
@@ -262,8 +263,10 @@ private:
auto stateColumnId = schema->GetColumnIndexOrThrow(TStateTable::StateColumnName);
std::vector<TStateTableRow> rows;
+ auto rowsRange = rowset->GetRows();
+ rows.reserve(rowsRange.Size());
- for (auto row : rowset->GetRows()) {
+ for (auto row : rowsRange) {
TStateTableRow stateRow;
YT_ASSERT(row[tabletIndexColumnId].Type == EValueType::Int64);
@@ -522,7 +525,7 @@ private:
while (!state->Batches.empty() && !state->Promises.empty()) {
const auto& batch = state->Batches.front();
const auto& promise = state->Promises.front();
- toFulfill.push_back(std::make_tuple(batch, promise));
+ toFulfill.push_back(std::tuple(batch, promise));
state->Batches.pop_front();
state->Promises.pop_front();
state->BatchesRowCount -= batch.RowCount;
@@ -598,6 +601,7 @@ private:
auto rows = rowset->GetRows();
if (!rows.Empty()) {
std::vector<i64> rowIndexes;
+ rowIndexes.reserve(rows.Size());
for (auto row : rows) {
i64 rowIndex;
FromUnversionedRow(
@@ -653,6 +657,9 @@ private:
auto rowBuffer = New<TRowBuffer>(TPersistentQueuePollerBufferTag());
std::vector<TUnversionedRow> rows;
+ if (auto rowCount = batch.EndRowIndex - batch.BeginRowIndex; rowCount > 0) {
+ rows.reserve(rowCount);
+ }
for (i64 rowIndex = batch.BeginRowIndex; rowIndex < batch.EndRowIndex; ++rowIndex) {
auto row = rowBuffer->AllocateUnversioned(3);
row[0] = MakeUnversionedInt64Value(batch.TabletIndex, tabletIndexColumnId);
@@ -776,6 +783,9 @@ private:
auto rowBuffer = New<TRowBuffer>(TPersistentQueuePollerBufferTag());
std::vector<TUnversionedRow> deleteKeys;
+ if (auto rowCount = stateTrimRowIndex - statistics.LastTrimmedRowIndex; rowCount > 0) {
+ deleteKeys.reserve(rowCount);
+ }
for (i64 rowIndex = statistics.LastTrimmedRowIndex; rowIndex < stateTrimRowIndex; ++rowIndex) {
auto key = rowBuffer->AllocateUnversioned(2);
key[0] = MakeUnversionedInt64Value(tabletIndex, tabletIndexColumnId);
diff --git a/yt/yt/client/api/rowset.cpp b/yt/yt/client/api/rowset.cpp
index c60d60f0c1..70207d48c7 100644
--- a/yt/yt/client/api/rowset.cpp
+++ b/yt/yt/client/api/rowset.cpp
@@ -188,7 +188,7 @@ private:
std::tuple<IUnversionedRowsetWriterPtr, TFuture<IUnversionedRowsetPtr>> CreateSchemafulRowsetWriter(TTableSchemaPtr schema)
{
auto writer = New<TSchemafulRowsetWriter>(std::move(schema));
- return std::make_tuple(writer, writer->GetResult());
+ return std::tuple(writer, writer->GetResult());
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/client/api/rpc_proxy/client_base.cpp b/yt/yt/client/api/rpc_proxy/client_base.cpp
index 6b5dbced6a..0c5bdf0e32 100644
--- a/yt/yt/client/api/rpc_proxy/client_base.cpp
+++ b/yt/yt/client/api/rpc_proxy/client_base.cpp
@@ -1002,9 +1002,7 @@ TFuture<TSelectRowsResult> TClientBase::SelectRows(
req->set_memory_limit_per_node(options.MemoryLimitPerNode);
ToProto(req->mutable_suppressable_access_tracking_options(), options);
req->set_replica_consistency(static_cast<NProto::EReplicaConsistency>(options.ReplicaConsistency));
- if (options.UseCanonicalNullRelations) {
- req->set_use_canonical_null_relations(options.UseCanonicalNullRelations);
- }
+ req->set_use_canonical_null_relations(options.UseCanonicalNullRelations);
return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspSelectRowsPtr& rsp) {
TSelectRowsResult result;
@@ -1067,7 +1065,7 @@ TFuture<TPullRowsResult> TClientBase::PullRows(
THROW_ERROR_EXCEPTION("Duplicate tablet id in end replication row indexes")
<< TErrorAttribute("tablet_id", tabletId);
}
- InsertOrCrash(result.EndReplicationRowIndexes, std::make_pair(tabletId, rowIndex));
+ InsertOrCrash(result.EndReplicationRowIndexes, std::pair(tabletId, rowIndex));
}
result.Rowset = DeserializeRowset(
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.cpp b/yt/yt/client/api/rpc_proxy/client_impl.cpp
index e62188c044..687ca42ec4 100644
--- a/yt/yt/client/api/rpc_proxy/client_impl.cpp
+++ b/yt/yt/client/api/rpc_proxy/client_impl.cpp
@@ -339,6 +339,7 @@ TFuture<void> TClient::ReshardTable(
auto writer = CreateWireProtocolWriter();
// XXX(sandello): This is ugly and inefficient.
std::vector<TUnversionedRow> keys;
+ keys.reserve(pivotKeys.size());
for (const auto& pivotKey : pivotKeys) {
keys.push_back(pivotKey);
}
@@ -659,6 +660,7 @@ TFuture<TGetTabletErrorsResult> TClient::GetTabletErrors(
for (i64 index = 0; index != rsp->tablet_ids_size(); ++index) {
std::vector<TError> errors;
+ errors.reserve(rsp->tablet_errors(index).errors().size());
for (const auto& protoError : rsp->tablet_errors(index).errors()) {
errors.push_back(FromProto<TError>(protoError));
}
@@ -667,6 +669,7 @@ TFuture<TGetTabletErrorsResult> TClient::GetTabletErrors(
for (i64 index = 0; index != rsp->replica_ids_size(); ++index) {
std::vector<TError> errors;
+ errors.reserve(rsp->replication_errors(index).errors().size());
for (const auto& protoError : rsp->replication_errors(index).errors()) {
errors.push_back(FromProto<TError>(protoError));
}
@@ -851,6 +854,7 @@ TFuture<std::vector<TListQueueConsumerRegistrationsResult>> TClient::ListQueueCo
return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspListQueueConsumerRegistrationsPtr& rsp) {
std::vector<TListQueueConsumerRegistrationsResult> result;
+ result.reserve(rsp->registrations().size());
for (const auto& registration : rsp->registrations()) {
std::optional<std::vector<int>> partitions;
if (registration.has_partitions()) {
diff --git a/yt/yt/client/api/rpc_proxy/connection_impl.cpp b/yt/yt/client/api/rpc_proxy/connection_impl.cpp
index 179cee1b2a..f2ec4bb2e3 100644
--- a/yt/yt/client/api/rpc_proxy/connection_impl.cpp
+++ b/yt/yt/client/api/rpc_proxy/connection_impl.cpp
@@ -430,8 +430,10 @@ std::vector<TString> TConnection::DiscoverProxiesViaServiceDiscovery()
THROW_ERROR_EXCEPTION("No service discovery configured");
}
+ const auto& clusters = Config_->ProxyEndpoints->Clusters;
std::vector<TFuture<TEndpointSet>> asyncEndpointSets;
- for (const auto& cluster : Config_->ProxyEndpoints->Clusters) {
+ asyncEndpointSets.reserve(clusters.size());
+ for (const auto& cluster : clusters) {
asyncEndpointSets.push_back(ServiceDiscovery_->ResolveEndpoints(
cluster,
Config_->ProxyEndpoints->EndpointSetId));
@@ -448,7 +450,7 @@ std::vector<TString> TConnection::DiscoverProxiesViaServiceDiscovery()
YT_LOG_WARNING(
endpointSets[i],
"Could not resolve endpoints from cluster (Cluster: %v, EndpointSetId: %v)",
- Config_->ProxyEndpoints->Clusters[i],
+ clusters[i],
Config_->ProxyEndpoints->EndpointSetId);
continue;
}
diff --git a/yt/yt/client/api/rpc_proxy/row_stream.cpp b/yt/yt/client/api/rpc_proxy/row_stream.cpp
index 4fac08b20a..de999f1d2e 100644
--- a/yt/yt/client/api/rpc_proxy/row_stream.cpp
+++ b/yt/yt/client/api/rpc_proxy/row_stream.cpp
@@ -88,7 +88,7 @@ std::tuple<TSharedRef, TMutableRef> SerializeRowStreamBlockEnvelope(
YT_VERIFY(current == block.End());
- return std::make_tuple(std::move(block), payloadRef);
+ return std::tuple(std::move(block), payloadRef);
}
TSharedRef DeserializeRowStreamBlockEnvelope(
diff --git a/yt/yt/client/api/rpc_proxy/table_mount_cache.cpp b/yt/yt/client/api/rpc_proxy/table_mount_cache.cpp
index 43365bf3fb..36750629a8 100644
--- a/yt/yt/client/api/rpc_proxy/table_mount_cache.cpp
+++ b/yt/yt/client/api/rpc_proxy/table_mount_cache.cpp
@@ -73,6 +73,7 @@ private:
tableInfo->PhysicalPath = path;
}
+ tableInfo->Tablets.reserve(rsp->tablets_size());
for (const auto& protoTabletInfo : rsp->tablets()) {
auto tabletInfo = New<NTabletClient::TTabletInfo>();
FromProto(tabletInfo.Get(), protoTabletInfo);
diff --git a/yt/yt/client/api/rpc_proxy/transaction_impl.cpp b/yt/yt/client/api/rpc_proxy/transaction_impl.cpp
index e3c621c8f1..0514415b8f 100644
--- a/yt/yt/client/api/rpc_proxy/transaction_impl.cpp
+++ b/yt/yt/client/api/rpc_proxy/transaction_impl.cpp
@@ -305,7 +305,7 @@ TFuture<TTransactionCommitResult> TTransaction::Commit(const TTransactionCommitO
})));
}
- return AllSucceeded(futures)
+ return AllSucceeded(std::move(futures))
.Apply(
BIND([=, this, this_ = MakeStrong(this)] {
auto req = Proxy_.CommitTransaction();
diff --git a/yt/yt/client/api/transaction.cpp b/yt/yt/client/api/transaction.cpp
index 8a2c421da8..1c2b7858b8 100644
--- a/yt/yt/client/api/transaction.cpp
+++ b/yt/yt/client/api/transaction.cpp
@@ -203,7 +203,7 @@ void ITransaction::AdvanceConsumer(
}
// TODO(achulkov2): Support consumers from any cluster.
- auto subConsumerClient = CreateSubConsumerClient(GetClient(), consumerPath.GetPath(), queuePhysicalPath);
+ auto subConsumerClient = CreateSubConsumerClient(GetClient(), /*queueClient*/ nullptr, consumerPath.GetPath(), queuePhysicalPath);
return subConsumerClient->Advance(MakeStrong(this), partitionIndex, oldOffset, newOffset);
}
diff --git a/yt/yt/client/arrow/arrow_row_stream_encoder.cpp b/yt/yt/client/arrow/arrow_row_stream_encoder.cpp
index b6dc214821..e4de28086f 100644
--- a/yt/yt/client/arrow/arrow_row_stream_encoder.cpp
+++ b/yt/yt/client/arrow/arrow_row_stream_encoder.cpp
@@ -52,7 +52,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
switch (simpleType) {
case ESimpleLogicalValueType::Null:
case ESimpleLogicalValueType::Void:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Null,
org::apache::arrow::flatbuf::CreateNull(*flatbufBuilder)
.Union());
@@ -65,7 +65,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
case ESimpleLogicalValueType::Uint16:
case ESimpleLogicalValueType::Int32:
case ESimpleLogicalValueType::Uint32:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Int,
org::apache::arrow::flatbuf::CreateInt(
*flatbufBuilder,
@@ -73,7 +73,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
IsIntegralTypeSigned(simpleType)).Union());
case ESimpleLogicalValueType::Double:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_FloatingPoint,
org::apache::arrow::flatbuf::CreateFloatingPoint(
*flatbufBuilder,
@@ -81,20 +81,20 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
.Union());
case ESimpleLogicalValueType::Boolean:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Bool,
org::apache::arrow::flatbuf::CreateBool(*flatbufBuilder)
.Union());
case ESimpleLogicalValueType::String:
case ESimpleLogicalValueType::Any:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Binary,
org::apache::arrow::flatbuf::CreateBinary(*flatbufBuilder)
.Union());
case ESimpleLogicalValueType::Utf8:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Utf8,
org::apache::arrow::flatbuf::CreateUtf8(*flatbufBuilder)
.Union());
@@ -621,7 +621,7 @@ auto SerializeRecordBatch(
auto totalSize = context->CurrentBodyOffset;
- return std::make_tuple(
+ return std::tuple(
recordBatchOffset,
totalSize,
[context = std::move(context)] (TMutableRef dstRef) {
@@ -930,6 +930,7 @@ private:
int arrowDictionaryIdCounter = 0;
std::vector<flatbuffers::Offset<org::apache::arrow::flatbuf::Field>> fieldOffsets;
+ fieldOffsets.reserve(TypedColumns_.size());
for (const auto& typedColumn : TypedColumns_) {
auto optionalColumnSchema = FindColumnSchema(*typedColumn.Column);
diff --git a/yt/yt/client/chaos_client/replication_card.cpp b/yt/yt/client/chaos_client/replication_card.cpp
index e94771bba5..1b57792136 100644
--- a/yt/yt/client/chaos_client/replication_card.cpp
+++ b/yt/yt/client/chaos_client/replication_card.cpp
@@ -537,7 +537,7 @@ std::optional<TTimestamp> FindReplicationProgressTimestampForKey(
progress.Segments.end(),
key,
[&] (const auto& /*key*/, const auto& segment) {
- return CompareValueRanges(key, segment.LowerKey.Elements()) < 0;
+ return CompareValueRanges(key, segment.LowerKey.Elements()) < 0;
});
YT_VERIFY(it > progress.Segments.begin());
diff --git a/yt/yt/client/chunk_client/data_statistics.cpp b/yt/yt/client/chunk_client/data_statistics.cpp
index 6e72d1df97..46736f5570 100644
--- a/yt/yt/client/chunk_client/data_statistics.cpp
+++ b/yt/yt/client/chunk_client/data_statistics.cpp
@@ -179,7 +179,7 @@ TString ToString(const TDataStatistics& statistics)
TCodecStatistics& TCodecStatistics::Append(const TCodecDuration& codecTime)
{
- return Append(std::make_pair(codecTime.Codec, codecTime.CpuDuration));
+ return Append(std::pair(codecTime.Codec, codecTime.CpuDuration));
}
TCodecStatistics& TCodecStatistics::Append(const std::pair<ECodec, TDuration>& codecTime)
diff --git a/yt/yt/client/chunk_client/read_limit.cpp b/yt/yt/client/chunk_client/read_limit.cpp
index 2195eda42b..3d10604388 100644
--- a/yt/yt/client/chunk_client/read_limit.cpp
+++ b/yt/yt/client/chunk_client/read_limit.cpp
@@ -239,10 +239,9 @@ void TLegacyReadLimit::InitMove(NProto::TReadLimit&& readLimit)
size_t TLegacyReadLimit::SpaceUsed() const
{
- return
- sizeof(*this) +
- ReadLimit_.SpaceUsed() - sizeof(ReadLimit_) +
- Key_.GetSpaceUsed() - sizeof(Key_);
+ return sizeof(*this) +
+ ReadLimit_.SpaceUsed() - sizeof(ReadLimit_) +
+ Key_.GetSpaceUsed() - sizeof(Key_);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/client/complex_types/yson_format_conversion.cpp b/yt/yt/client/complex_types/yson_format_conversion.cpp
index 0eee4f2d97..e69305cfa3 100644
--- a/yt/yt/client/complex_types/yson_format_conversion.cpp
+++ b/yt/yt/client/complex_types/yson_format_conversion.cpp
@@ -1083,8 +1083,9 @@ TYsonCursorConverter CreateYsonConverterImpl(
return TYsonConsumerScannerFactory::CreateListScanner(descriptor, TListHandler(), elementConverter);
}
case ELogicalMetatype::Tuple: {
- std::vector<TYsonCursorConverter> elementConverters;
const auto size = type->GetElements().size();
+ std::vector<TYsonCursorConverter> elementConverters;
+ elementConverters.reserve(size);
for (size_t i = 0; i != size; ++i) {
elementConverters.push_back(CreateYsonConverterImpl(descriptor.TupleElement(i), cache, config));
}
diff --git a/yt/yt/client/driver/etc_commands.cpp b/yt/yt/client/driver/etc_commands.cpp
index 0212e6398b..bc589fadae 100644
--- a/yt/yt/client/driver/etc_commands.cpp
+++ b/yt/yt/client/driver/etc_commands.cpp
@@ -367,6 +367,7 @@ void TExecuteBatchCommand::DoExecute(ICommandContextPtr context)
auto mutationId = Options.GetOrGenerateMutationId();
std::vector<TCallback<TFuture<TYsonString>()>> callbacks;
+ callbacks.reserve(Requests.size());
for (int requestIndex = 0; requestIndex < std::ssize(Requests); ++requestIndex) {
auto executor = New<TRequestExecutor>(
context,
@@ -378,7 +379,7 @@ void TExecuteBatchCommand::DoExecute(ICommandContextPtr context)
callbacks.push_back(BIND(&TRequestExecutor::Run, executor));
}
- auto results = WaitFor(RunWithBoundedConcurrency(callbacks, Options.Concurrency))
+ auto results = WaitFor(RunWithBoundedConcurrency(std::move(callbacks), Options.Concurrency))
.ValueOrThrow();
ProduceSingleOutput(context, "results", [&] (NYson::IYsonConsumer* consumer) {
diff --git a/yt/yt/client/driver/queue_commands.cpp b/yt/yt/client/driver/queue_commands.cpp
index e2aaf35e7c..39eb23776b 100644
--- a/yt/yt/client/driver/queue_commands.cpp
+++ b/yt/yt/client/driver/queue_commands.cpp
@@ -227,13 +227,20 @@ void TAdvanceConsumerCommand::Register(TRegistrar registrar)
registrar.Parameter("old_offset", &TThis::OldOffset)
.Optional();
registrar.Parameter("new_offset", &TThis::NewOffset);
+ registrar.Parameter("client_side", &TThis::ClientSide)
+ .Optional();
}
void TAdvanceConsumerCommand::DoExecute(ICommandContextPtr context)
{
auto transaction = GetTransaction(context);
- transaction->AdvanceConsumer(ConsumerPath, QueuePath, PartitionIndex, OldOffset, NewOffset);
+ if (!ClientSide || *ClientSide) {
+ transaction->AdvanceConsumer(ConsumerPath, QueuePath, PartitionIndex, OldOffset, NewOffset);
+ } else {
+ WaitFor(transaction->AdvanceConsumer(ConsumerPath, QueuePath, PartitionIndex, OldOffset, NewOffset, /*options*/ {}))
+ .ThrowOnError();
+ }
if (ShouldCommitTransaction()) {
WaitFor(transaction->Commit())
diff --git a/yt/yt/client/driver/queue_commands.h b/yt/yt/client/driver/queue_commands.h
index db78db9143..f2fa8fe5ef 100644
--- a/yt/yt/client/driver/queue_commands.h
+++ b/yt/yt/client/driver/queue_commands.h
@@ -118,6 +118,7 @@ private:
int PartitionIndex;
std::optional<i64> OldOffset;
i64 NewOffset;
+ std::optional<bool> ClientSide;
void DoExecute(ICommandContextPtr context) override;
};
diff --git a/yt/yt/client/driver/table_commands.cpp b/yt/yt/client/driver/table_commands.cpp
index c9ac75001d..5f474f6fbc 100644
--- a/yt/yt/client/driver/table_commands.cpp
+++ b/yt/yt/client/driver/table_commands.cpp
@@ -1049,6 +1049,7 @@ void TLookupRowsCommand::DoExecute(ICommandContextPtr context)
if (ColumnNames) {
TColumnFilter::TIndexes columnFilterIndexes;
+ columnFilterIndexes.reserve(ColumnNames->size());
for (const auto& name : *ColumnNames) {
auto optionalIndex = nameTable->FindId(name);
if (!optionalIndex) {
diff --git a/yt/yt/client/hedging/hedging_executor.cpp b/yt/yt/client/hedging/hedging_executor.cpp
index bd3e98e4fe..2eef4faa40 100644
--- a/yt/yt/client/hedging/hedging_executor.cpp
+++ b/yt/yt/client/hedging/hedging_executor.cpp
@@ -61,10 +61,11 @@ void THedgingExecutor::OnFinishRequest(
clientInfo.Counter->ExternalPenalty.Update(NProfiling::CpuDurationToDuration(externalPenalty));
}
-THedgingExecutor::TEntry::TEntry(NApi::IClientPtr client,
- NProfiling::TCpuDuration initialPenalty,
- TCounterPtr counter,
- TString clusterName)
+THedgingExecutor::TEntry::TEntry(
+ NApi::IClientPtr client,
+ NProfiling::TCpuDuration initialPenalty,
+ TCounterPtr counter,
+ TString clusterName)
: Client(std::move(client))
, ClusterName(std::move(clusterName))
, AdaptivePenalty(0)
@@ -72,8 +73,7 @@ THedgingExecutor::TEntry::TEntry(NApi::IClientPtr client,
, ExternalPenalty(0)
, BanUntil(Max<NProfiling::TCpuInstant>())
, Counter(std::move(counter))
-{
-}
+{ }
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/client/hedging/hedging_executor.h b/yt/yt/client/hedging/hedging_executor.h
index 6c29a111f7..b9e4380f9b 100644
--- a/yt/yt/client/hedging/hedging_executor.h
+++ b/yt/yt/client/hedging/hedging_executor.h
@@ -82,10 +82,11 @@ private:
struct TEntry
{
- TEntry(NApi::IClientPtr client,
- NProfiling::TCpuDuration initialPenalty,
- TCounterPtr counter,
- TString clusterName);
+ TEntry(
+ NApi::IClientPtr client,
+ NProfiling::TCpuDuration initialPenalty,
+ TCounterPtr counter,
+ TString clusterName);
NApi::IClientPtr Client;
TString ClusterName;
diff --git a/yt/yt/client/node_tracker_client/node_directory.cpp b/yt/yt/client/node_tracker_client/node_directory.cpp
index 1374d57890..ab6992b418 100644
--- a/yt/yt/client/node_tracker_client/node_directory.cpp
+++ b/yt/yt/client/node_tracker_client/node_directory.cpp
@@ -78,7 +78,7 @@ TNodeDescriptor::TNodeDescriptor()
{ }
TNodeDescriptor::TNodeDescriptor(const TString& defaultAddress)
- : Addresses_{std::make_pair(DefaultNetworkName, defaultAddress)}
+ : Addresses_{std::pair(DefaultNetworkName, defaultAddress)}
, DefaultAddress_(defaultAddress)
{ }
diff --git a/yt/yt/client/queue_client/consumer_client.cpp b/yt/yt/client/queue_client/consumer_client.cpp
index 8690cb6433..bee0f82a52 100644
--- a/yt/yt/client/queue_client/consumer_client.cpp
+++ b/yt/yt/client/queue_client/consumer_client.cpp
@@ -1,4 +1,7 @@
#include "consumer_client.h"
+
+#include "common.h"
+#include "helpers.h"
#include "private.h"
#include <yt/yt/client/table_client/config.h>
@@ -40,11 +43,21 @@ static const auto& Logger = QueueClientLogger;
////////////////////////////////////////////////////////////////////////////////
+static constexpr TStringBuf YTConsumerMetaColumnName = "meta";
+
+static const TTableSchemaPtr YTConsumerWithoutMetaTableSchema = New<TTableSchema>(std::vector<TColumnSchema>{
+ TColumnSchema("queue_cluster", EValueType::String, ESortOrder::Ascending).SetRequired(true),
+ TColumnSchema("queue_path", EValueType::String, ESortOrder::Ascending).SetRequired(true),
+ TColumnSchema("partition_index", EValueType::Uint64, ESortOrder::Ascending).SetRequired(true),
+ TColumnSchema("offset", EValueType::Uint64).SetRequired(true),
+}, /*strict*/ true, /*uniqueKeys*/ true);
+
static const TTableSchemaPtr YTConsumerTableSchema = New<TTableSchema>(std::vector<TColumnSchema>{
TColumnSchema("queue_cluster", EValueType::String, ESortOrder::Ascending).SetRequired(true),
TColumnSchema("queue_path", EValueType::String, ESortOrder::Ascending).SetRequired(true),
TColumnSchema("partition_index", EValueType::Uint64, ESortOrder::Ascending).SetRequired(true),
TColumnSchema("offset", EValueType::Uint64).SetRequired(true),
+ TColumnSchema("meta", EValueType::Any).SetRequired(false),
}, /*strict*/ true, /*uniqueKeys*/ true);
static const TTableSchemaPtr BigRTConsumerTableSchema = New<TTableSchema>(std::vector<TColumnSchema>{
@@ -52,26 +65,57 @@ static const TTableSchemaPtr BigRTConsumerTableSchema = New<TTableSchema>(std::v
TColumnSchema("Offset", EValueType::Uint64),
}, /*strict*/ true, /*uniqueKeys*/ true);
+////////////////////////////////////////////////////////////////////////////////
+
+struct TConsumerMeta
+ : public NYTree::TYsonStructLite
+{
+ std::optional<i64> CumulativeDataWeight;
+ std::optional<ui64> OffsetTimestamp;
+
+ REGISTER_YSON_STRUCT_LITE(TConsumerMeta);
+
+ static void Register(TRegistrar registrar)
+ {
+ registrar.Parameter("cumulative_data_weight", &TThis::CumulativeDataWeight)
+ .Optional();
+ registrar.Parameter("offset_timestamp", &TThis::OffsetTimestamp)
+ .Optional();
+ }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
class TGenericConsumerClient
: public ISubConsumerClient
{
public:
TGenericConsumerClient(
- TYPath path,
+ IClientPtr consumerClusterClient,
+ IClientPtr queueClusterClient,
+ TYPath consumerPath,
+ std::optional<TCrossClusterReference> queueRef,
TUnversionedOwningRow rowPrefix,
TStringBuf partitionIndexColumnName,
TStringBuf offsetColumnName,
bool decrementOffset,
- const TTableSchemaPtr& tableSchema)
- : Path_(std::move(path))
+ const TTableSchemaPtr& consumerTableSchema,
+ const TTableSchemaPtr& queueTableSchema)
+ : ConsumerClusterClient_(std::move(consumerClusterClient))
+ , QueueClusterClient_(std::move(queueClusterClient))
+ , ConsumerPath_(std::move(consumerPath))
+ , QueueRef_(std::move(queueRef))
, RowPrefix_(std::move(rowPrefix))
, PartitionIndexColumnName_(std::move(partitionIndexColumnName))
, OffsetColumnName_(std::move(offsetColumnName))
- , TableSchema_(tableSchema)
- , NameTable_(TNameTable::FromSchema(*TableSchema_))
- , PartitionIndexColumnId_(NameTable_->GetId(PartitionIndexColumnName_))
- , OffsetColumnId_(NameTable_->GetId(OffsetColumnName_))
+ , ConsumerTableSchema_(consumerTableSchema)
+ , ConsumerNameTable_(TNameTable::FromSchema(*ConsumerTableSchema_))
+ , QueueTableSchema_(queueTableSchema)
+ , PartitionIndexColumnId_(ConsumerNameTable_->GetId(PartitionIndexColumnName_))
+ , OffsetColumnId_(ConsumerNameTable_->GetId(OffsetColumnName_))
+ , MetaColumnId_(ConsumerNameTable_->FindId(YTConsumerMetaColumnName))
, SubConsumerColumnFilter_{PartitionIndexColumnId_, OffsetColumnId_}
+ , RowBuffer_(New<TRowBuffer>())
, DecrementOffset_(decrementOffset)
{
if (RowPrefix_.GetCount() == 0) {
@@ -83,7 +127,7 @@ public:
if (index != 0) {
builder.AppendString(", ");
}
- builder.AppendFormat("[%v]", TableSchema_->Columns()[index].Name());
+ builder.AppendFormat("[%v]", ConsumerTableSchema_->Columns()[index].Name());
}
builder.AppendString(") = (");
for (int index = 0; index < RowPrefix_.GetCount(); ++index) {
@@ -99,7 +143,7 @@ public:
}
void Advance(
- const ITransactionPtr& transaction,
+ const ITransactionPtr& consumerTransaction,
int partitionIndex,
std::optional<i64> oldOffset,
i64 newOffset) const override
@@ -117,7 +161,7 @@ public:
options.RetentionConfig = New<TRetentionConfig>();
options.RetentionConfig->MaxDataVersions = 1;
- auto partitionRowset = WaitFor(transaction->VersionedLookupRows(Path_, NameTable_, keyRowsBuilder.Build(), options))
+ auto partitionRowset = WaitFor(consumerTransaction->VersionedLookupRows(ConsumerPath_, ConsumerNameTable_, keyRowsBuilder.Build(), options))
.ValueOrThrow()
.Rowset;
const auto& rows = partitionRowset->GetRows();
@@ -128,7 +172,7 @@ public:
THROW_ERROR_EXCEPTION_UNLESS(
std::ssize(partitionRowset->GetRows()) <= 1,
"The table for consumer %Qv should contain at most one row for partition %v when an old offset is specified",
- Path_,
+ ConsumerPath_,
partitionIndex);
i64 currentOffset = 0;
@@ -148,7 +192,7 @@ public:
YT_LOG_DEBUG(
"Read current offset (Consumer: %v, PartitionIndex: %v, Offset: %v, Timestamp: %v)",
- Path_,
+ ConsumerPath_,
partitionIndex,
currentOffset,
offsetTimestamp);
@@ -159,11 +203,11 @@ public:
EErrorCode::ConsumerOffsetConflict,
"Offset conflict at partition %v of consumer %v: expected offset %v, found offset %v",
partitionIndex,
- Path_,
+ ConsumerPath_,
*oldOffset,
currentOffset)
<< TErrorAttribute("partition", partitionIndex)
- << TErrorAttribute("consumer", Path_)
+ << TErrorAttribute("consumer", ConsumerPath_)
<< TErrorAttribute("expected_offset", *oldOffset)
<< TErrorAttribute("current_offset", currentOffset)
<< TErrorAttribute("current_offset_timestamp", offsetTimestamp);
@@ -187,19 +231,36 @@ public:
} else {
rowBuilder.AddValue(MakeUnversionedUint64Value(newOffset, OffsetColumnId_));
}
- rowsBuilder.AddRow(rowBuilder.GetRow());
+
+ std::optional<TYsonString> metaYsonString;
+ if (MetaColumnId_) {
+ auto metaValue = MakeUnversionedNullValue(*MetaColumnId_);
+ if (QueueRef_ && QueueClusterClient_) {
+ auto meta = GetConsumerMeta(partitionIndex, newOffset);
+ if (meta) {
+ metaYsonString = ConvertToYsonString(*meta);
+ metaValue = MakeUnversionedAnyValue(metaYsonString->AsStringBuf(), *MetaColumnId_);
+ }
+ } else {
+ YT_LOG_DEBUG("Consumer meta was not calculated due to unknown queue path or cluster client");
+ }
+
+ rowBuilder.AddValue(std::move(metaValue));
+ }
+
+ rowsBuilder.AddRow(RowBuffer_->CaptureRow(rowBuilder.GetRow()));
YT_LOG_DEBUG(
"Advancing consumer offset (Path: %v, Partition: %v, Offset: %v -> %v)",
- Path_,
+ ConsumerPath_,
partitionIndex,
oldOffset,
newOffset);
- transaction->WriteRows(Path_, NameTable_, rowsBuilder.Build());
+ consumerTransaction->WriteRows(ConsumerPath_, ConsumerNameTable_, rowsBuilder.Build());
+ RowBuffer_->Clear();
}
TFuture<std::vector<TPartitionInfo>> CollectPartitions(
- const IClientPtr& client,
int expectedPartitionCount,
bool withLastConsumeTime = false) const override
{
@@ -211,14 +272,13 @@ public:
"[%v], [%v] from [%v] where ([%v] between 0 and %v) and (%v)",
PartitionIndexColumnName_,
OffsetColumnName_,
- Path_,
+ ConsumerPath_,
PartitionIndexColumnName_,
expectedPartitionCount - 1,
RowPrefixCondition_);
return BIND(
&TGenericConsumerClient::DoCollectPartitions,
MakeStrong(this),
- client,
selectQuery,
withLastConsumeTime)
.AsyncVia(GetCurrentInvoker())
@@ -238,7 +298,6 @@ public:
}
TFuture<std::vector<TPartitionInfo>> CollectPartitions(
- const IClientPtr& client,
const std::vector<int>& partitionIndexes,
bool withLastConsumeTime) const override
{
@@ -246,14 +305,13 @@ public:
"[%v], [%v] from [%v] where ([%v] in (%v)) and (%v)",
PartitionIndexColumnName_,
OffsetColumnName_,
- Path_,
+ ConsumerPath_,
PartitionIndexColumnName_,
JoinSeq(",", partitionIndexes),
RowPrefixCondition_);
return BIND(
&TGenericConsumerClient::DoCollectPartitions,
MakeStrong(this),
- client,
selectQuery,
withLastConsumeTime)
.AsyncVia(GetCurrentInvoker())
@@ -280,21 +338,20 @@ public:
}));
}
- TFuture<TCrossClusterReference> FetchTargetQueue(const IClientPtr& client) const override
+ TFuture<TCrossClusterReference> FetchTargetQueue() const override
{
- return client->GetNode(Path_ + "/@target_queue")
+ return ConsumerClusterClient_->GetNode(ConsumerPath_ + "/@target_queue")
.Apply(BIND([] (const TYsonString& ysonString) {
return TCrossClusterReference::FromString(ConvertTo<TString>(ysonString));
}));
}
TFuture<TPartitionStatistics> FetchPartitionStatistics(
- const IClientPtr& client,
- const TYPath& queue,
+ const TYPath& queuePath,
int partitionIndex) const override
{
- return client->GetNode(queue + "/@tablets")
- .Apply(BIND([queue, partitionIndex] (const TYsonString& ysonString) -> TPartitionStatistics {
+ return QueueClusterClient_->GetNode(queuePath + "/@tablets")
+ .Apply(BIND([queuePath, partitionIndex] (const TYsonString& ysonString) -> TPartitionStatistics {
auto tabletList = ConvertToNode(ysonString)->AsList();
for (const auto& tablet : tabletList->GetChildren()) {
@@ -309,25 +366,32 @@ public:
}
}
- THROW_ERROR_EXCEPTION("Queue %Qv has no tablet with index %v", queue, partitionIndex);
+ THROW_ERROR_EXCEPTION("Queue %v has no tablet with index %v", queuePath, partitionIndex);
}));
}
private:
- const TYPath Path_;
+ const IClientPtr ConsumerClusterClient_;
+ const IClientPtr QueueClusterClient_;
+ const TYPath ConsumerPath_;
+ const std::optional<TCrossClusterReference> QueueRef_;
const TUnversionedOwningRow RowPrefix_;
//! A condition of form ([ColumnName0], [ColumnName1], ...) = (RowPrefix_[0], RowPrefix_[1], ...)
//! defining this subconsumer.
TString RowPrefixCondition_;
const TStringBuf PartitionIndexColumnName_;
const TStringBuf OffsetColumnName_;
- const TTableSchemaPtr& TableSchema_;
- const TNameTablePtr NameTable_;
+ const TTableSchemaPtr ConsumerTableSchema_;
+ const TNameTablePtr ConsumerNameTable_;
+ const TTableSchemaPtr QueueTableSchema_;
const int PartitionIndexColumnId_;
const int OffsetColumnId_;
+ const std::optional<int> MetaColumnId_;
//! A column filter consisting of PartitionIndexColumnName_ and OffsetColumnName_.
const TColumnFilter SubConsumerColumnFilter_;
+ TRowBufferPtr RowBuffer_;
+
// COMPAT(achulkov2): Remove this once we drop support for legacy BigRT consumers.
//! Controls whether the offset is decremented before being written to the offset table.
//! BigRT stores the offset of the last read row, so for legacy BigRT consumers this option
@@ -335,7 +399,6 @@ private:
bool DecrementOffset_ = false;
std::vector<TPartitionInfo> DoCollectPartitions(
- const IClientPtr& client,
const TString& selectQuery,
bool withLastConsumeTime) const
{
@@ -345,7 +408,7 @@ private:
TSelectRowsOptions selectRowsOptions;
selectRowsOptions.ReplicaConsistency = EReplicaConsistency::Sync;
- auto selectRowsResult = WaitFor(client->SelectRows(selectQuery, selectRowsOptions))
+ auto selectRowsResult = WaitFor(ConsumerClusterClient_->SelectRows(selectQuery, selectRowsOptions))
.ValueOrThrow();
// Note that after table construction table schema may have changed.
@@ -419,9 +482,9 @@ private:
options.RetentionConfig->MaxDataVersions = 1;
options.ReplicaConsistency = EReplicaConsistency::Sync;
- auto versionedRowset = WaitFor(client->VersionedLookupRows(
- Path_,
- NameTable_,
+ auto versionedRowset = WaitFor(ConsumerClusterClient_->VersionedLookupRows(
+ ConsumerPath_,
+ ConsumerNameTable_,
builder.Build(),
options))
.ValueOrThrow()
@@ -439,11 +502,72 @@ private:
return result;
}
+
+ std::optional<TConsumerMeta> GetConsumerMeta(
+ int partitionIndex,
+ i64 offset) const
+ {
+ if (!QueueRef_ || !QueueClusterClient_ || !QueueTableSchema_) {
+ return {};
+ }
+
+ auto params = TCollectPartitionRowInfoParams{
+ .HasCumulativeDataWeightColumn = static_cast<bool>(QueueTableSchema_->FindColumn(CumulativeDataWeightColumnName)),
+ .HasTimestampColumn = static_cast<bool>(QueueTableSchema_->FindColumn(TimestampColumnName)),
+ };
+
+ std::vector<std::pair<int, i64>> tabletAndRowIndices = {{partitionIndex, offset}};
+ if (offset > 0) {
+ tabletAndRowIndices.push_back({partitionIndex, offset - 1});
+ }
+
+ auto partitionRowInfos = CollectPartitionRowInfos(
+ QueueRef_->Path,
+ QueueClusterClient_,
+ std::move(tabletAndRowIndices),
+ params,
+ Logger);
+
+ auto partitionIt = partitionRowInfos.find(partitionIndex);
+ if (partitionIt == partitionRowInfos.end()) {
+ YT_LOG_DEBUG("Failed to collect row info for partition (Path: %v, PartitionIndex: %v)",
+ QueueRef_->Path,
+ partitionIndex);
+ return {};
+ }
+
+ TConsumerMeta meta;
+
+ auto partitionRowIt = partitionIt->second.find(offset);
+ if (partitionRowIt != partitionIt->second.end()) {
+ meta.OffsetTimestamp = partitionRowIt->second.Timestamp;
+ } else {
+ YT_LOG_DEBUG("Failed to collect consumer offset timestamp (Path: %v, PartitionIndex: %v, Offset: %v)",
+ QueueRef_->Path,
+ partitionIndex,
+ offset);
+ }
+
+ if (offset > 0) {
+ auto partitionRowIt = partitionIt->second.find(offset - 1);
+ if (partitionRowIt != partitionIt->second.end()) {
+ meta.CumulativeDataWeight = partitionRowIt->second.CumulativeDataWeight;
+ } else {
+ YT_LOG_DEBUG("Failed to collect consumer cumulative data weight (Path: %v, PartitionIndex: %v, Offset: %v)",
+ QueueRef_->Path,
+ partitionIndex,
+ offset - 1);
+ }
+ }
+
+ return meta;
+ }
};
////////////////////////////////////////////////////////////////////////////////
ISubConsumerClientPtr CreateBigRTConsumerClient(
+ const IClientPtr& client,
const TYPath& path,
const TTableSchema& schema)
{
@@ -454,12 +578,16 @@ ISubConsumerClientPtr CreateBigRTConsumerClient(
if (schema == *BigRTConsumerTableSchema) {
return New<TGenericConsumerClient>(
+ client,
+ client,
path,
+ /*queuePath*/ std::nullopt,
TUnversionedOwningRow(),
"ShardId",
"Offset",
/*decrementOffset*/ true,
- BigRTConsumerTableSchema);
+ BigRTConsumerTableSchema,
+ /*queueTableSchema*/ nullptr);
} else {
THROW_ERROR_EXCEPTION("Table schema is not recognized as a valid BigRT consumer schema")
<< TErrorAttribute("expected_schema", *BigRTConsumerTableSchema)
@@ -475,7 +603,7 @@ ISubConsumerClientPtr CreateBigRTConsumerClient(
.ValueOrThrow();
auto schema = tableInfo->Schemas[ETableSchemaKind::Primary];
- return CreateBigRTConsumerClient(path, *schema);
+ return CreateBigRTConsumerClient(client, path, *schema);
}
////////////////////////////////////////////////////////////////////////////////
@@ -484,79 +612,98 @@ class TYTConsumerClient
: public IConsumerClient
{
public:
- explicit TYTConsumerClient(TYPath path)
- : Path_(std::move(path))
+ explicit TYTConsumerClient(const IClientPtr& consumerClusterClient, TYPath consumerPath, TTableSchemaPtr consumerTableSchema)
+ : ConsumerClusterClient_(consumerClusterClient)
+ , ConsumerPath_(std::move(consumerPath))
+ , ConsumerTableSchema_(std::move(consumerTableSchema))
{ }
- ISubConsumerClientPtr GetSubConsumerClient(const TCrossClusterReference& queue) const override
+ ISubConsumerClientPtr GetSubConsumerClient(const IClientPtr& queueClusterClient, const TCrossClusterReference& queueRef) const override
{
TUnversionedOwningRowBuilder builder;
- builder.AddValue(MakeUnversionedStringValue(queue.Cluster, QueueClusterColumnId_));
- builder.AddValue(MakeUnversionedStringValue(queue.Path, QueuePathColumnId_));
+ builder.AddValue(MakeUnversionedStringValue(queueRef.Cluster, QueueClusterColumnId_));
+ builder.AddValue(MakeUnversionedStringValue(queueRef.Path, QueuePathColumnId_));
auto row = builder.FinishRow();
+ TTableSchemaPtr queueTableSchema;
+ if (queueClusterClient) {
+ auto queueTableInfo = WaitFor(queueClusterClient->GetTableMountCache()->GetTableInfo(queueRef.Path))
+ .ValueOrThrow();
+ queueTableSchema = queueTableInfo->Schemas[ETableSchemaKind::Primary];
+ }
+
auto subConsumerClient = New<TGenericConsumerClient>(
- Path_,
+ ConsumerClusterClient_,
+ queueClusterClient,
+ ConsumerPath_,
+ std::optional<TCrossClusterReference>{queueRef},
std::move(row),
"partition_index",
"offset",
/*decrementOffset*/ false,
- YTConsumerTableSchema);
+ ConsumerTableSchema_,
+ queueTableSchema);
return subConsumerClient;
}
private:
- const TYPath Path_;
+ const IClientPtr ConsumerClusterClient_;
+ const TYPath ConsumerPath_;
+ TTableSchemaPtr ConsumerTableSchema_;
- static const TNameTablePtr NameTable_;
+ static const TNameTablePtr ConsumerNameTable_;
static const int QueueClusterColumnId_;
static const int QueuePathColumnId_;
};
-const TNameTablePtr TYTConsumerClient::NameTable_ = TNameTable::FromSchema(*YTConsumerTableSchema);
-const int TYTConsumerClient::QueueClusterColumnId_ = TYTConsumerClient::NameTable_->GetId("queue_cluster");
-const int TYTConsumerClient::QueuePathColumnId_ = TYTConsumerClient::NameTable_->GetId("queue_path");
+const TNameTablePtr TYTConsumerClient::ConsumerNameTable_ = TNameTable::FromSchema(*YTConsumerTableSchema);
+const int TYTConsumerClient::QueueClusterColumnId_ = TYTConsumerClient::ConsumerNameTable_->GetId("queue_cluster");
+const int TYTConsumerClient::QueuePathColumnId_ = TYTConsumerClient::ConsumerNameTable_->GetId("queue_path");
////////////////////////////////////////////////////////////////////////////////
IConsumerClientPtr CreateConsumerClient(
- const TYPath& path,
- const TTableSchema& schema)
+ const IClientPtr& consumerClusterClient,
+ const TYPath& consumerPath,
+ const TTableSchema& consumerSchema)
{
- if (!schema.IsUniqueKeys()) {
+ if (!consumerSchema.IsUniqueKeys()) {
THROW_ERROR_EXCEPTION("Consumer schema must have unique keys, schema does not")
- << TErrorAttribute("actual_schema", schema);
+ << TErrorAttribute("actual_schema", consumerSchema);
}
- if (schema == *YTConsumerTableSchema) {
- return New<TYTConsumerClient>(path);
+ if (consumerSchema == *YTConsumerTableSchema) {
+ return New<TYTConsumerClient>(consumerClusterClient, consumerPath, YTConsumerTableSchema);
+ } else if (consumerSchema == *YTConsumerWithoutMetaTableSchema) {
+ return New<TYTConsumerClient>(consumerClusterClient, consumerPath, YTConsumerWithoutMetaTableSchema);
} else {
THROW_ERROR_EXCEPTION("Table schema is not recognized as a valid consumer schema")
<< TErrorAttribute("expected_schema", *YTConsumerTableSchema)
- << TErrorAttribute("actual_schema", schema);
+ << TErrorAttribute("actual_schema", consumerSchema);
}
}
IConsumerClientPtr CreateConsumerClient(
- const IClientPtr& client,
- const TYPath& path)
+ const IClientPtr& consumerClusterClient,
+ const TYPath& consumerPath)
{
- auto tableInfo = WaitFor(client->GetTableMountCache()->GetTableInfo(path))
+ auto tableInfo = WaitFor(consumerClusterClient->GetTableMountCache()->GetTableInfo(consumerPath))
.ValueOrThrow();
auto schema = tableInfo->Schemas[ETableSchemaKind::Primary];
- return CreateConsumerClient(path, *schema);
+ return CreateConsumerClient(consumerClusterClient, consumerPath, *schema);
}
ISubConsumerClientPtr CreateSubConsumerClient(
- const IClientPtr& client,
+ const IClientPtr& consumerClusterClient,
+ const IClientPtr& queueClusterClient,
const TYPath& consumerPath,
TRichYPath queuePath)
{
auto queueCluster = queuePath.GetCluster();
if (!queueCluster) {
- if (auto clientCluster = client->GetClusterName()) {
+ if (auto clientCluster = consumerClusterClient->GetClusterName()) {
queueCluster = *clientCluster;
}
}
@@ -572,7 +719,7 @@ ISubConsumerClientPtr CreateSubConsumerClient(
queueRef.Cluster = *queueCluster;
queueRef.Path = queuePath.GetPath();
- return CreateConsumerClient(client, consumerPath)->GetSubConsumerClient(queueRef);
+ return CreateConsumerClient(consumerClusterClient, consumerPath)->GetSubConsumerClient(queueClusterClient, queueRef);
}
const TTableSchemaPtr& GetConsumerSchema()
diff --git a/yt/yt/client/queue_client/consumer_client.h b/yt/yt/client/queue_client/consumer_client.h
index 80bfce0435..0f9f1ff794 100644
--- a/yt/yt/client/queue_client/consumer_client.h
+++ b/yt/yt/client/queue_client/consumer_client.h
@@ -35,7 +35,7 @@ struct ISubConsumerClient
//! If oldOffset is specified, the current offset is read (within the transaction) and compared with oldOffset.
//! If they are equal, the new offset is written, otherwise an exception is thrown.
virtual void Advance(
- const NApi::ITransactionPtr& transaction,
+ const NApi::ITransactionPtr& consumerTransaction,
int partitionIndex,
std::optional<i64> oldOffset,
i64 newOffset) const = 0;
@@ -43,19 +43,17 @@ struct ISubConsumerClient
//! Collect partition infos. If there are entries in the consumer table with partition
//! indices outside of range [0, expectedPartitionCount), they will be ignored.
virtual TFuture<std::vector<TPartitionInfo>> CollectPartitions(
- const NApi::IClientPtr& client,
int expectedPartitionCount,
bool withLastConsumeTime = false) const = 0;
//! Collect partition infos.
//! Entries in the consumer table with partition indices not in the given vector will be ignored.
virtual TFuture<std::vector<TPartitionInfo>> CollectPartitions(
- const NApi::IClientPtr& client,
const std::vector<int>& partitionIndexes,
bool withLastConsumeTime = false) const = 0;
//! Fetch and parse the target_queue attribute of this consumer.
- virtual TFuture<TCrossClusterReference> FetchTargetQueue(const NApi::IClientPtr& client) const = 0;
+ virtual TFuture<TCrossClusterReference> FetchTargetQueue() const = 0;
struct TPartitionStatistics
{
@@ -67,7 +65,6 @@ struct ISubConsumerClient
// TODO(achulkov2): Move this to a separate IQueueClient class?
//! Fetch relevant per-tablet statistics for queue.
virtual TFuture<TPartitionStatistics> FetchPartitionStatistics(
- const NApi::IClientPtr& client,
const NYPath::TYPath& queue,
int partitionIndex) const = 0;
};
@@ -77,7 +74,7 @@ DEFINE_REFCOUNTED_TYPE(ISubConsumerClient)
struct IConsumerClient
: public TRefCounted
{
- virtual ISubConsumerClientPtr GetSubConsumerClient(const TCrossClusterReference& queue) const = 0;
+ virtual ISubConsumerClientPtr GetSubConsumerClient(const NApi::IClientPtr& queueClusterClient, const TCrossClusterReference& queueRef) const = 0;
};
DEFINE_REFCOUNTED_TYPE(IConsumerClient)
@@ -89,6 +86,7 @@ DEFINE_REFCOUNTED_TYPE(IConsumerClient)
//! Creates a BigRT single-queue consumer client.
ISubConsumerClientPtr CreateBigRTConsumerClient(
+ const NApi::IClientPtr& client,
const NYPath::TYPath& path,
const NTableClient::TTableSchema& schema);
@@ -100,21 +98,23 @@ ISubConsumerClientPtr CreateBigRTConsumerClient(
//! Creates a native YT multi-queue consumer client.
IConsumerClientPtr CreateConsumerClient(
- const NYPath::TYPath& path,
- const NTableClient::TTableSchema& schema);
+ const NApi::IClientPtr& consumerClusterClient,
+ const NYPath::TYPath& consumerPath,
+ const NTableClient::TTableSchema& consumerSchema);
//! Uses the table mount cache to fetch the consumer's schema and
//! make sure the consumer actually has YT consumer schema.
IConsumerClientPtr CreateConsumerClient(
- const NApi::IClientPtr& client,
- const NYPath::TYPath& path);
+ const NApi::IClientPtr& clusterClient,
+ const NYPath::TYPath& consumerPath);
//! Uses the table mount cache to fetch the consumer's schema and
//! make sure the consumer actually has YT consumer schema.
//! Uses the given queue path to fetch the corresponding subconsumer.
//! If no cluster is set for queue, it is inferred from the given client.
ISubConsumerClientPtr CreateSubConsumerClient(
- const NApi::IClientPtr& client,
+ const NApi::IClientPtr& consumerClusterClient,
+ const NApi::IClientPtr& queueClusterClient,
const NYPath::TYPath& consumerPath,
NYPath::TRichYPath queuePath);
diff --git a/yt/yt/client/queue_client/helpers.cpp b/yt/yt/client/queue_client/helpers.cpp
new file mode 100644
index 0000000000..89fd808dc6
--- /dev/null
+++ b/yt/yt/client/queue_client/helpers.cpp
@@ -0,0 +1,95 @@
+#include "helpers.h"
+
+#include <yt/yt/client/api/client.h>
+
+#include <yt/yt/client/table_client/helpers.h>
+
+namespace NYT::NQueueClient {
+
+using namespace NApi;
+using namespace NObjectClient;
+using namespace NConcurrency;
+using namespace NYPath;
+using namespace NLogging;
+using namespace NTableClient;
+using namespace NTabletClient;
+using namespace NQueueClient;
+
+////////////////////////////////////////////////////////////////////////////////
+
+THashMap<int, THashMap<i64, TPartitionRowInfo>> CollectPartitionRowInfos(
+ const TYPath& path,
+ const IClientPtr& client,
+ const std::vector<std::pair<int, i64>>& tabletAndRowIndices,
+ const TCollectPartitionRowInfoParams& params,
+ const TLogger& logger)
+{
+ const auto& Logger = logger;
+
+ if (tabletAndRowIndices.empty()) {
+ return {};
+ }
+
+ TStringBuilder queryBuilder;
+ queryBuilder.AppendString("[$tablet_index], [$row_index]");
+
+ std::optional<size_t> cumulativeDataWeightColumnId;
+ std::optional<size_t> timestampColumnId;
+
+ ui32 expectedRowSize = 2;
+ if (params.HasCumulativeDataWeightColumn) {
+ queryBuilder.AppendFormat(", [%v]", CumulativeDataWeightColumnName);
+ cumulativeDataWeightColumnId = expectedRowSize;
+ ++expectedRowSize;
+ }
+ if (params.HasTimestampColumn) {
+ queryBuilder.AppendFormat(", [%v]", TimestampColumnName);
+ timestampColumnId = expectedRowSize;
+ ++expectedRowSize;
+ }
+
+ queryBuilder.AppendFormat("from [%v] where ([$tablet_index], [$row_index]) in (",
+ path);
+
+ bool isFirstTuple = true;
+ for (const auto& [partitionIndex, rowIndex] : tabletAndRowIndices) {
+ if (!isFirstTuple) {
+ queryBuilder.AppendString(", ");
+ }
+ queryBuilder.AppendFormat("(%vu, %vu)", partitionIndex, rowIndex);
+ isFirstTuple = false;
+ }
+
+ queryBuilder.AppendString(")");
+
+ YT_VERIFY(!isFirstTuple);
+
+ auto query = queryBuilder.Flush();
+ TSelectRowsOptions options;
+ options.ReplicaConsistency = EReplicaConsistency::Sync;
+ YT_LOG_TRACE("Executing query for partition row infos (Query: %v)", query);
+ auto selectResult = WaitFor(client->SelectRows(query, options))
+ .ValueOrThrow();
+
+ THashMap<int, THashMap<i64, TPartitionRowInfo>> result;
+
+ for (const auto& row : selectResult.Rowset->GetRows()) {
+ YT_VERIFY(row.GetCount() == expectedRowSize);
+
+ auto tabletIndex = FromUnversionedValue<int>(row[0]);
+ auto rowIndex = FromUnversionedValue<i64>(row[1]);
+
+ result[tabletIndex].emplace(rowIndex, TPartitionRowInfo{
+ .CumulativeDataWeight = cumulativeDataWeightColumnId
+ ? FromUnversionedValue<std::optional<i64>>(row[*cumulativeDataWeightColumnId])
+ : std::nullopt,
+ .Timestamp = timestampColumnId
+ ? FromUnversionedValue<std::optional<ui64>>(row[*timestampColumnId])
+ : std::nullopt,
+ });
+ }
+
+ return result;
+}
+
+} // namespace NYT::NQueueClient
diff --git a/yt/yt/client/queue_client/helpers.h b/yt/yt/client/queue_client/helpers.h
new file mode 100644
index 0000000000..86b38c69d7
--- /dev/null
+++ b/yt/yt/client/queue_client/helpers.h
@@ -0,0 +1,31 @@
+#include <yt/yt/client/api/public.h>
+#include <yt/yt/client/api/client_common.h>
+
+namespace NYT::NQueueClient {
+
+////////////////////////////////////////////////////////////////////////////////
+
+struct TPartitionRowInfo
+{
+ std::optional<i64> CumulativeDataWeight;
+ std::optional<NYT::NTransactionClient::TTimestamp> Timestamp;
+};
+
+struct TCollectPartitionRowInfoParams
+{
+ bool HasCumulativeDataWeightColumn = false;
+ bool HasTimestampColumn = false;
+};
+
+//! Collect info (cumulative data weight and timestamp) from rows with given (tablet_index, row_index) pairs and
+//! return them as a tablet_index: (row_index: info) map.
+THashMap<int, THashMap<i64, TPartitionRowInfo>> CollectPartitionRowInfos(
+ const NYPath::TYPath& path,
+ const NApi::IClientPtr& client,
+ const std::vector<std::pair<int, i64>>& tabletAndRowIndices,
+ const TCollectPartitionRowInfoParams& params,
+ const NLogging::TLogger& logger);
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NQueueClient
diff --git a/yt/yt/client/queue_client/partition_reader.cpp b/yt/yt/client/queue_client/partition_reader.cpp
index fa2934469d..075feec9fa 100644
--- a/yt/yt/client/queue_client/partition_reader.cpp
+++ b/yt/yt/client/queue_client/partition_reader.cpp
@@ -208,7 +208,7 @@ private:
TWallTimer timer;
std::vector<int> partitionIndexesToFetch{PartitionIndex_};
- auto partitions = WaitFor(ConsumerClient_->CollectPartitions(Client_, partitionIndexesToFetch))
+ auto partitions = WaitFor(ConsumerClient_->CollectPartitions(partitionIndexesToFetch))
.ValueOrThrow();
YT_VERIFY(partitions.size() <= 1);
@@ -230,12 +230,12 @@ private:
ConsumerClient_ = CreateBigRTConsumerClient(Client_, ConsumerPath_);
- QueuePath_ = WaitFor(ConsumerClient_->FetchTargetQueue(Client_))
+ QueuePath_ = WaitFor(ConsumerClient_->FetchTargetQueue())
.ValueOrThrow().Path;
Logger.AddTag("Queue: %v", QueuePath_);
- auto partitionStatistics = WaitFor(ConsumerClient_->FetchPartitionStatistics(Client_, QueuePath_, PartitionIndex_))
+ auto partitionStatistics = WaitFor(ConsumerClient_->FetchPartitionStatistics(QueuePath_, PartitionIndex_))
.ValueOrThrow();
RecomputeApproximateDataWeightPerRow(partitionStatistics.FlushedDataWeight, partitionStatistics.FlushedRowCount);
@@ -430,7 +430,7 @@ private:
TWallTimer timer;
std::vector<int> partitionIndexesToFetch{PartitionIndex_};
- auto partitions = WaitFor(ConsumerClient_->CollectPartitions(Client_, partitionIndexesToFetch))
+ auto partitions = WaitFor(ConsumerClient_->CollectPartitions(partitionIndexesToFetch))
.ValueOrThrow();
YT_VERIFY(partitions.size() <= 1);
@@ -455,10 +455,12 @@ private:
THROW_ERROR_EXCEPTION("Queue cluster must be specified");
}
- ConsumerClient_ = CreateConsumerClient(Client_, ConsumerPath_.GetPath())->GetSubConsumerClient({
- .Cluster = *queueCluster,
- .Path = QueuePath_.GetPath(),
- });
+ ConsumerClient_ = CreateConsumerClient(Client_, ConsumerPath_.GetPath())->GetSubConsumerClient(
+ Client_,
+ {
+ .Cluster = *queueCluster,
+ .Path = QueuePath_.GetPath()
+ });
Opened_ = true;
diff --git a/yt/yt/client/scheduler/public.h b/yt/yt/client/scheduler/public.h
index d6f3da28f9..63dd9b792d 100644
--- a/yt/yt/client/scheduler/public.h
+++ b/yt/yt/client/scheduler/public.h
@@ -74,6 +74,8 @@ DEFINE_ENUM(ESchemaInferenceMode,
(FromOutput)
);
+// NB(eshcherbin): This enum must be synchronized at schedulers ans CAs.
+// If you change it, you must bump the controller agent tracker service protocol version!
DEFINE_ENUM(EAbortReason,
((None) ( 0))
((Scheduler) ( 1))
diff --git a/yt/yt/client/table_client/columnar.cpp b/yt/yt/client/table_client/columnar.cpp
index cce7b42c90..5bd667708f 100644
--- a/yt/yt/client/table_client/columnar.cpp
+++ b/yt/yt/client/table_client/columnar.cpp
@@ -184,11 +184,11 @@ void BuildBitmapFromRleImpl(
}
#define XX2(currentBoolValue) \
- if (thresholdIndex - currentIndex >= 16) { \
- XX1(currentBoolValue, true) \
- } else { \
- XX1(currentBoolValue, false) \
- }
+ if (thresholdIndex - currentIndex >= 16) { \
+ XX1(currentBoolValue, true) \
+ } else { \
+ XX1(currentBoolValue, false) \
+ }
++currentRleIndex;
thresholdIndex = currentRleIndex < std::ssize(rleIndexes)
diff --git a/yt/yt/client/table_client/schema.cpp b/yt/yt/client/table_client/schema.cpp
index 40125c1ee7..013b698a26 100644
--- a/yt/yt/client/table_client/schema.cpp
+++ b/yt/yt/client/table_client/schema.cpp
@@ -1638,7 +1638,7 @@ void ValidateDynamicTableConstraints(const TTableSchema& schema)
}
if (schema.GetKeyColumnCount() == std::ssize(schema.Columns())) {
- THROW_ERROR_EXCEPTION("There must be at least one non-key column");
+ THROW_ERROR_EXCEPTION("There must be at least one non-key column");
}
if (schema.GetKeyColumnCount() > MaxKeyColumnCountInDynamicTable) {
diff --git a/yt/yt/client/table_client/unittests/columnar_ut.cpp b/yt/yt/client/table_client/unittests/columnar_ut.cpp
index 66a5067af7..35e25ecd99 100644
--- a/yt/yt/client/table_client/unittests/columnar_ut.cpp
+++ b/yt/yt/client/table_client/unittests/columnar_ut.cpp
@@ -201,15 +201,15 @@ INSTANTIATE_TEST_SUITE_P(
TCopyBitmapRangeToBitmapTest,
TCopyBitmapRangeToBitmapTest,
::testing::Values(
- std::make_tuple( 0, 0),
- std::make_tuple( 0, 64),
- std::make_tuple( 0, 192),
- std::make_tuple( 64, 128),
- std::make_tuple( 8, 16),
- std::make_tuple( 10, 13),
- std::make_tuple( 5, 120),
- std::make_tuple( 23, 67),
- std::make_tuple( 1, 191)));
+ std::tuple( 0, 0),
+ std::tuple( 0, 64),
+ std::tuple( 0, 192),
+ std::tuple( 64, 128),
+ std::tuple( 8, 16),
+ std::tuple( 10, 13),
+ std::tuple( 5, 120),
+ std::tuple( 23, 67),
+ std::tuple( 1, 191)));
////////////////////////////////////////////////////////////////////////////////
@@ -256,13 +256,13 @@ INSTANTIATE_TEST_SUITE_P(
TDecodeRleVectorTest,
TDecodeRleVectorTest,
::testing::Values(
- std::make_tuple( 0, 0, std::vector<int>{}),
- std::make_tuple( 0, 1, std::vector<int>{1}),
- std::make_tuple( 0, 5, std::vector<int>{1, 2, 2, 2, 2}),
- std::make_tuple( 9, 13, std::vector<int>{2, 3, 4, 4}),
- std::make_tuple( 20, 25, std::vector<int>{5, 5, 5, 5, 5}),
- std::make_tuple( 25, 27, std::vector<int>{6, 6}),
- std::make_tuple( 50, 53, std::vector<int>{6, 6, 6})));
+ std::tuple( 0, 0, std::vector<int>{}),
+ std::tuple( 0, 1, std::vector<int>{1}),
+ std::tuple( 0, 5, std::vector<int>{1, 2, 2, 2, 2}),
+ std::tuple( 9, 13, std::vector<int>{2, 3, 4, 4}),
+ std::tuple( 20, 25, std::vector<int>{5, 5, 5, 5, 5}),
+ std::tuple( 25, 27, std::vector<int>{6, 6}),
+ std::tuple( 50, 53, std::vector<int>{6, 6, 6})));
////////////////////////////////////////////////////////////////////////////////
@@ -386,13 +386,13 @@ INSTANTIATE_TEST_SUITE_P(
TDecodeNullsFromRleDictionaryIndexesWithZeroNullTest,
TDecodeNullsFromRleDictionaryIndexesWithZeroNullTest,
::testing::Values(
- std::make_tuple( 0, 0),
- std::make_tuple( 0, 800),
- std::make_tuple(256, 512),
- std::make_tuple( 10, 20),
- std::make_tuple( 10, 20),
- std::make_tuple( 20, 100),
- std::make_tuple( 90, 110)));
+ std::tuple( 0, 0),
+ std::tuple( 0, 800),
+ std::tuple(256, 512),
+ std::tuple( 10, 20),
+ std::tuple( 10, 20),
+ std::tuple( 20, 100),
+ std::tuple( 90, 110)));
////////////////////////////////////////////////////////////////////////////////
@@ -428,11 +428,11 @@ INSTANTIATE_TEST_SUITE_P(
TBuildDictionaryIndexesFromRleDictionaryIndexesWithZeroNullTest,
TBuildDictionaryIndexesFromRleDictionaryIndexesWithZeroNullTest,
::testing::Values(
- std::make_tuple( 0, 0),
- std::make_tuple( 0, 15),
- std::make_tuple( 3, 5),
- std::make_tuple( 1, 10),
- std::make_tuple( 13, 15)));
+ std::tuple( 0, 0),
+ std::tuple( 0, 15),
+ std::tuple( 3, 5),
+ std::tuple( 1, 10),
+ std::tuple( 13, 15)));
////////////////////////////////////////////////////////////////////////////////
@@ -460,11 +460,11 @@ INSTANTIATE_TEST_SUITE_P(
TBuildIotaDictionaryIndexesFromRleIndexesTest,
TBuildIotaDictionaryIndexesFromRleIndexesTest,
::testing::Values(
- std::make_tuple( 0, 0, std::vector<ui32>{}),
- std::make_tuple( 0, 15, std::vector<ui32>{0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4}),
- std::make_tuple( 3, 5, std::vector<ui32>{0, 0}),
- std::make_tuple( 1, 10, std::vector<ui32>{0, 0, 1, 1, 2, 2, 2, 2, 2}),
- std::make_tuple( 13, 15, std::vector<ui32>{0, 0})));
+ std::tuple( 0, 0, std::vector<ui32>{}),
+ std::tuple( 0, 15, std::vector<ui32>{0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4}),
+ std::tuple( 3, 5, std::vector<ui32>{0, 0}),
+ std::tuple( 1, 10, std::vector<ui32>{0, 0, 1, 1, 2, 2, 2, 2, 2}),
+ std::tuple( 13, 15, std::vector<ui32>{0, 0})));
////////////////////////////////////////////////////////////////////////////////
@@ -483,10 +483,10 @@ INSTANTIATE_TEST_SUITE_P(
TCountNullsInDictionaryIndexesWithZeroNullTest,
TCountNullsInDictionaryIndexesWithZeroNullTest,
::testing::Values(
- std::make_tuple(std::vector<ui32>{}, 0),
- std::make_tuple(std::vector<ui32>{0, 0, 0}, 3),
- std::make_tuple(std::vector<ui32>{1, 2, 3}, 0),
- std::make_tuple(std::vector<ui32>{1, 0, 3}, 1)));
+ std::tuple(std::vector<ui32>{}, 0),
+ std::tuple(std::vector<ui32>{0, 0, 0}, 3),
+ std::tuple(std::vector<ui32>{1, 2, 3}, 0),
+ std::tuple(std::vector<ui32>{1, 0, 3}, 1)));
////////////////////////////////////////////////////////////////////////////////
@@ -509,12 +509,12 @@ INSTANTIATE_TEST_SUITE_P(
TCountOnesInRleBitmapTest,
TCountOnesInRleBitmapTest,
::testing::Values(
- std::make_tuple( 0, 0, 0),
- std::make_tuple( 50, 60, 10),
- std::make_tuple( 40, 60, 10),
- std::make_tuple( 60, 100, 40),
- std::make_tuple( 3, 5, 0),
- std::make_tuple( 2, 6, 2)));
+ std::tuple( 0, 0, 0),
+ std::tuple( 50, 60, 10),
+ std::tuple( 40, 60, 10),
+ std::tuple( 60, 100, 40),
+ std::tuple( 3, 5, 0),
+ std::tuple( 2, 6, 2)));
////////////////////////////////////////////////////////////////////////////////
@@ -574,13 +574,13 @@ INSTANTIATE_TEST_SUITE_P(
TDecodeNullsFromRleNullBitmapTest,
TDecodeNullsFromRleNullBitmapTest,
::testing::Values(
- std::make_tuple( 0, 0),
- std::make_tuple( 0, 800),
- std::make_tuple(256, 512),
- std::make_tuple( 10, 20),
- std::make_tuple( 10, 20),
- std::make_tuple( 20, 100),
- std::make_tuple( 90, 110)));
+ std::tuple( 0, 0),
+ std::tuple( 0, 800),
+ std::tuple(256, 512),
+ std::tuple( 10, 20),
+ std::tuple( 10, 20),
+ std::tuple( 20, 100),
+ std::tuple( 90, 110)));
////////////////////////////////////////////////////////////////////////////////
@@ -626,15 +626,15 @@ INSTANTIATE_TEST_SUITE_P(
TDecodeBytemapFromBitmapTest,
TDecodeBytemapFromBitmapTest,
::testing::Values(
- std::make_tuple( 0, 0),
- std::make_tuple( 18, 19),
- std::make_tuple( 0, 512),
- std::make_tuple( 0, 800),
- std::make_tuple(256, 512),
- std::make_tuple( 10, 20),
- std::make_tuple( 10, 20),
- std::make_tuple( 20, 100),
- std::make_tuple( 90, 110)));
+ std::tuple( 0, 0),
+ std::tuple( 18, 19),
+ std::tuple( 0, 512),
+ std::tuple( 0, 800),
+ std::tuple(256, 512),
+ std::tuple( 10, 20),
+ std::tuple( 10, 20),
+ std::tuple( 20, 100),
+ std::tuple( 90, 110)));
////////////////////////////////////////////////////////////////////////////////
@@ -704,12 +704,12 @@ INSTANTIATE_TEST_SUITE_P(
TCountTotalStringLengthInRleDictionaryIndexesWithZeroNullTest,
TCountTotalStringLengthInRleDictionaryIndexesWithZeroNullTest,
::testing::Values(
- std::make_tuple( 0, 0),
- std::make_tuple( 0, 30),
- std::make_tuple( 1, 3),
- std::make_tuple( 5, 10),
- std::make_tuple( 4, 25),
- std::make_tuple( 2, 4)));
+ std::tuple( 0, 0),
+ std::tuple( 0, 30),
+ std::tuple( 1, 3),
+ std::tuple( 5, 10),
+ std::tuple( 4, 25),
+ std::tuple( 2, 4)));
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/client/table_client/unittests/helpers/helpers.cpp b/yt/yt/client/table_client/unittests/helpers/helpers.cpp
index c28b576218..c0b611f6a2 100644
--- a/yt/yt/client/table_client/unittests/helpers/helpers.cpp
+++ b/yt/yt/client/table_client/unittests/helpers/helpers.cpp
@@ -193,7 +193,7 @@ std::vector<std::pair<ui32, ui32>> GetTimestampIndexRanges(
++upperTimestampIndex;
}
- indexRanges.push_back(std::make_pair(lowerTimestampIndex, upperTimestampIndex));
+ indexRanges.push_back(std::pair(lowerTimestampIndex, upperTimestampIndex));
}
return indexRanges;
}
diff --git a/yt/yt/client/table_client/validate_logical_type.cpp b/yt/yt/client/table_client/validate_logical_type.cpp
index 8dc20d94e2..11dbb5fa3f 100644
--- a/yt/yt/client/table_client/validate_logical_type.cpp
+++ b/yt/yt/client/table_client/validate_logical_type.cpp
@@ -613,7 +613,7 @@ public:
}
private:
- bool Finished_ = false;
+ bool Finished_ = false;
};
template <>
diff --git a/yt/yt/client/table_client/value_consumer.h b/yt/yt/client/table_client/value_consumer.h
index 3ec3be5fd0..da7ce44cb9 100644
--- a/yt/yt/client/table_client/value_consumer.h
+++ b/yt/yt/client/table_client/value_consumer.h
@@ -82,7 +82,7 @@ class TBuildingValueConsumer
: public TValueConsumerBase
{
public:
- TBuildingValueConsumer(
+ TBuildingValueConsumer(
TTableSchemaPtr schema,
NLogging::TLogger logger,
bool convertNullToEntity,
diff --git a/yt/yt/client/table_client/wire_protocol.cpp b/yt/yt/client/table_client/wire_protocol.cpp
index 88edc852c7..85e911a119 100644
--- a/yt/yt/client/table_client/wire_protocol.cpp
+++ b/yt/yt/client/table_client/wire_protocol.cpp
@@ -276,6 +276,11 @@ private:
void UnsafeWriteRaw(const void* buffer, size_t size)
{
+ if (!buffer) {
+ YT_VERIFY(size == 0);
+ return;
+ }
+
NSan::CheckMemIsInitialized(buffer, size);
memcpy(Current_, buffer, size);
diff --git a/yt/yt/client/tablet_client/config.cpp b/yt/yt/client/tablet_client/config.cpp
index 193a6f0417..7a070967c8 100644
--- a/yt/yt/client/tablet_client/config.cpp
+++ b/yt/yt/client/tablet_client/config.cpp
@@ -114,7 +114,7 @@ std::tuple<int, int> TReplicatedTableOptions::GetEffectiveMinMaxReplicaCount(int
minSyncReplicas = MinSyncReplicaCount.value_or(maxSyncReplicas);
- return std::make_tuple(minSyncReplicas, maxSyncReplicas);
+ return std::tuple(minSyncReplicas, maxSyncReplicas);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/client/tablet_client/table_mount_cache_detail.cpp b/yt/yt/client/tablet_client/table_mount_cache_detail.cpp
index 88b09bd406..0248500566 100644
--- a/yt/yt/client/tablet_client/table_mount_cache_detail.cpp
+++ b/yt/yt/client/tablet_client/table_mount_cache_detail.cpp
@@ -235,12 +235,12 @@ std::pair<std::optional<TErrorCode>, TTabletInfoPtr> TTableMountCacheBase::Inval
retryableErrorCode = std::nullopt;
}
- return std::make_pair(retryableErrorCode, tabletInfo);
+ return std::pair(retryableErrorCode, tabletInfo);
}
}
}
- return std::make_pair(std::nullopt, nullptr);
+ return std::pair(std::nullopt, nullptr);
}
void TTableMountCacheBase::Clear()
diff --git a/yt/yt/client/transaction_client/batching_timestamp_provider.cpp b/yt/yt/client/transaction_client/batching_timestamp_provider.cpp
index ad4919bad3..47d302d77f 100644
--- a/yt/yt/client/transaction_client/batching_timestamp_provider.cpp
+++ b/yt/yt/client/transaction_client/batching_timestamp_provider.cpp
@@ -54,7 +54,7 @@ public:
return Underlying_->GetLatestTimestamp();
}
- private:
+private:
const ITimestampProviderPtr Underlying_;
const TDuration BatchPeriod_;
diff --git a/yt/yt/client/transaction_client/helpers.cpp b/yt/yt/client/transaction_client/helpers.cpp
index 1837089cb7..8d223c974d 100644
--- a/yt/yt/client/transaction_client/helpers.cpp
+++ b/yt/yt/client/transaction_client/helpers.cpp
@@ -68,7 +68,7 @@ std::pair<TDuration, TDuration> TimestampDiffToDuration(TTimestamp loTimestamp,
YT_ASSERT(loTimestamp <= hiTimestamp);
auto loInstant = TimestampToInstant(loTimestamp);
auto hiInstant = TimestampToInstant(hiTimestamp);
- return std::make_pair(
+ return std::pair(
hiInstant.first >= loInstant.second ? hiInstant.first - loInstant.second : TDuration::Zero(),
hiInstant.second - loInstant.first);
}
diff --git a/yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp b/yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp
index 1d01e1eef6..37f42a529c 100644
--- a/yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp
+++ b/yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp
@@ -62,31 +62,31 @@ INSTANTIATE_TEST_SUITE_P(
TFarmHashTest,
TFarmHashTest,
::testing::Values(
- std::make_tuple(
+ std::tuple(
MakeUnversionedInt64Value(12345678, /*id*/ 0, EValueFlags::None),
MakeUnversionedUint64Value(42, /*id*/ 1, EValueFlags::Aggregate),
18329046069279503950ULL,
17355217915646310598ULL,
16453323425893019626ULL),
- std::make_tuple(
+ std::tuple(
MakeUnversionedUint64Value(12345678, /*id*/ 1, EValueFlags::Aggregate),
MakeUnversionedBooleanValue(true, /*id*/ 2, EValueFlags::Aggregate),
18329046069279503950ULL,
10105606910506535461ULL,
10502610411105654667ULL),
- std::make_tuple(
+ std::tuple(
MakeUnversionedDoubleValue(42.0, /*id*/ 2, EValueFlags::Aggregate),
MakeUnversionedStringValue("0", /*id*/ 3, EValueFlags::None),
6259286942292166412ULL,
15198969275252572735ULL,
12125805494429148155ULL),
- std::make_tuple(
+ std::tuple(
MakeUnversionedBooleanValue(false, /*id*/ 3, EValueFlags::Aggregate),
MakeUnversionedStringValue("", /*id*/ 4, EValueFlags::None),
0ULL,
11160318154034397263ULL,
10248854568006048452ULL),
- std::make_tuple(
+ std::tuple(
MakeUnversionedStringValue("abc", /*id*/ 4, EValueFlags::None),
MakeUnversionedInt64Value(-1000000, /*id*/ 5, EValueFlags::None),
2640714258260161385ULL,
diff --git a/yt/yt/client/unittests/replication_progress_ut.cpp b/yt/yt/client/unittests/replication_progress_ut.cpp
index e82b1e62a3..d9315fe015 100644
--- a/yt/yt/client/unittests/replication_progress_ut.cpp
+++ b/yt/yt/client/unittests/replication_progress_ut.cpp
@@ -61,31 +61,31 @@ INSTANTIATE_TEST_SUITE_P(
TUpdateReplicationProgressTest,
TUpdateReplicationProgressTest,
::testing::Values(
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=1u}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=1u}];upper_key=[<type=max>#]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[1];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[1];timestamp=1}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1u}];upper_key=[<type=max>#]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[1];timestamp=1}];upper_key=[2]}",
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1};{lower_key=[2];timestamp=0}];upper_key=[<type=max>#]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[2]}",
"{segments=[{lower_key=[1];timestamp=1}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1}];upper_key=[2]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[2];timestamp=2}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[1];timestamp=1};{lower_key=[3];timestamp=3}];upper_key=[4]}",
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1};{lower_key=[2];timestamp=2};{lower_key=[3];timestamp=3};{lower_key=[4];timestamp=2}];upper_key=[<type=max>#]}")
@@ -121,47 +121,47 @@ INSTANTIATE_TEST_SUITE_P(
TCompareReplicationProgressTest,
TCompareReplicationProgressTest,
::testing::Values(
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
true),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
false),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=0};];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
false),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1}];upper_key=[1]}",
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=2}];upper_key=[<type=max>#]}",
true),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[2];timestamp=1};{lower_key=[4];timestamp=2}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[1];timestamp=0};{lower_key=[3];timestamp=1}];upper_key=[4]}",
true),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=1}];upper_key=[1]}",
true),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1};{lower_key=[2];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1};{lower_key=[2];timestamp=0}];upper_key=[<type=max>#]}",
true),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[1];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=0}];upper_key=[<type=max>#]}",
true),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[2];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=0}];upper_key=[<type=max>#]}",
true),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[2];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=1};{lower_key=[3];timestamp=0}];upper_key=[<type=max>#]}",
false),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=0}];upper_key=[<type=max>#]}",
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1}];upper_key=[<type=max>#]}",
false)
@@ -201,26 +201,26 @@ INSTANTIATE_TEST_SUITE_P(
TGatherReplicationProgressTest,
TGatherReplicationProgressTest,
::testing::Values(
- std::make_tuple(
+ std::tuple(
std::vector<const char*>{
"{segments=[{lower_key=[];timestamp=0}];upper_key=[1]}",
"{segments=[{lower_key=[1];timestamp=1}];upper_key=[2]}"
},
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1}];upper_key=[2]}"),
- std::make_tuple(
+ std::tuple(
std::vector<const char*>{
"{segments=[{lower_key=[];timestamp=0}];upper_key=[1]}",
"{segments=[{lower_key=[0];timestamp=0}];upper_key=[2]}"
},
"{segments=[{lower_key=[];timestamp=0}];upper_key=[2]}"),
- std::make_tuple(
+ std::tuple(
std::vector<const char*>{
"{segments=[{lower_key=[];timestamp=0}];upper_key=[1]}",
"{segments=[{lower_key=[1];timestamp=1}];upper_key=[2]}",
"{segments=[{lower_key=[2];timestamp=1}];upper_key=[3]}"
},
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1}];upper_key=[3]}"),
- std::make_tuple(
+ std::tuple(
std::vector<const char*>{
"{segments=[{lower_key=[];timestamp=0}];upper_key=[1]}",
"{segments=[{lower_key=[1];timestamp=0}];upper_key=[2]}",
@@ -283,7 +283,7 @@ INSTANTIATE_TEST_SUITE_P(
TScatterReplicationProgressTest,
TScatterReplicationProgressTest,
::testing::Values(
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"[[]; [1]]",
"[<type=max>#]",
@@ -291,7 +291,7 @@ INSTANTIATE_TEST_SUITE_P(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[1]}",
"{segments=[{lower_key=[1];timestamp=0}];upper_key=[<type=max>#]}"
}),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[<type=max>#]}",
"[[]; [1]]",
"[2]",
@@ -299,7 +299,7 @@ INSTANTIATE_TEST_SUITE_P(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[1]}",
"{segments=[{lower_key=[1];timestamp=0}];upper_key=[2]}"
}),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1}];upper_key=[2]}",
"[[]; [1]]",
"[2]",
@@ -307,7 +307,7 @@ INSTANTIATE_TEST_SUITE_P(
"{segments=[{lower_key=[];timestamp=0}];upper_key=[1]}",
"{segments=[{lower_key=[1];timestamp=1}];upper_key=[2]}"
}),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[2];timestamp=1};{lower_key=[4];timestamp=0}];upper_key=[6]}",
"[[1]; [3]]",
"[5]",
@@ -315,7 +315,7 @@ INSTANTIATE_TEST_SUITE_P(
"{segments=[{lower_key=[1];timestamp=0};{lower_key=[2];timestamp=1}];upper_key=[3]}",
"{segments=[{lower_key=[3];timestamp=1};{lower_key=[4];timestamp=0}];upper_key=[5]}",
}),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[2];timestamp=1};{lower_key=[4];timestamp=0}];upper_key=[6]}",
"[[1]; [4]]",
"[6]",
@@ -323,7 +323,7 @@ INSTANTIATE_TEST_SUITE_P(
"{segments=[{lower_key=[1];timestamp=0};{lower_key=[2];timestamp=1}];upper_key=[4]}",
"{segments=[{lower_key=[4];timestamp=0}];upper_key=[6]}"
}),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[2];timestamp=1};{lower_key=[4];timestamp=0}];upper_key=[6]}",
"[[3]; [4]]",
"[5]",
@@ -331,7 +331,7 @@ INSTANTIATE_TEST_SUITE_P(
"{segments=[{lower_key=[3];timestamp=1}];upper_key=[4]}",
"{segments=[{lower_key=[4];timestamp=0}];upper_key=[5]}"
}),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[2];timestamp=1};{lower_key=[4];timestamp=0}];upper_key=[6]}",
"[[1]; [2]; [3]; [4]; [5]]",
"[6]",
@@ -374,31 +374,31 @@ INSTANTIATE_TEST_SUITE_P(
TReplicationProgressTimestampForKeyTest,
TReplicationProgressTimestampForKeyTest,
::testing::Values(
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
"[1]",
1),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[1];timestamp=1}];upper_key=[<type=max>#]}",
"[]",
std::nullopt),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1}];upper_key=[1]}",
"[1]",
std::nullopt),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1}];upper_key=[1]}",
"[2]",
std::nullopt),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1}];upper_key=[<type=max>#]}",
"[1]",
1),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=0};{lower_key=[1];timestamp=1};{lower_key=[2];timestamp=2};];upper_key=[<type=max>#]}",
"[1]",
1),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[2];timestamp=2};];upper_key=[<type=max>#]}",
"[1]",
1)
@@ -431,16 +431,16 @@ INSTANTIATE_TEST_SUITE_P(
TReplicationProgressSerialization,
TReplicationProgressSerialization,
::testing::Values(
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
"{Segments: [<[], 1>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2}];upper_key=[<type=max>#]}",
"{Segments: [<[], 1>, <[0#1], 2>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2};{lower_key=[2];timestamp=3}];upper_key=[<type=max>#]}",
"{Segments: [<[], 1>, <[0#1], 2>, <[0#2], 3>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2};{lower_key=[2];timestamp=3};{lower_key=[3];timestamp=4};{lower_key=[4];timestamp=5};"
"{lower_key=[5];timestamp=6};{lower_key=[6];timestamp=7};{lower_key=[7];timestamp=8};{lower_key=[8];timestamp=9}];upper_key=[<type=max>#]}",
"{Segments: [<[], 1>, <[0#1], 2>, <[0#2], 3>, <[0#3], 4>, <[0#4], 5>, <[0#5], 6>, <[0#6], 7>, <[0#7], 8>, <[0#8], 9>], UpperKey: [0#<Max>]}")
@@ -481,52 +481,52 @@ INSTANTIATE_TEST_SUITE_P(
TReplicationProgressProjectedSerialization,
TReplicationProgressProjectedSerialization,
::testing::Values(
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
"[0]",
"[1]",
"{Segments: [<[], 1>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
"[0]",
"[<type=max>#]",
"{Segments: [<[], 1>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2}];upper_key=[<type=max>#]}",
"[0]",
"[1]",
"{Segments: [<[], 1>, <[0#1], 2>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2}];upper_key=[<type=max>#]}",
"[1]",
"[2]",
"{Segments: [<[], 1>, <[0#1], 2>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2}];upper_key=[<type=max>#]}",
"[1]",
"[<type=max>#]",
"{Segments: [<[], 1>, <[0#1], 2>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2};{lower_key=[2];timestamp=3}];upper_key=[<type=max>#]}",
"[]",
"[1]",
"{Segments: [<[], 1>, <[0#1], 2>, ...], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2};{lower_key=[2];timestamp=3}];upper_key=[<type=max>#]}",
"[1]",
"[2]",
"{Segments: [<[], 1>, <[0#1], 2>, <[0#2], 3>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2};{lower_key=[2];timestamp=3}];upper_key=[<type=max>#]}",
"[2]",
"[3]",
"{Segments: [<[], 1>, ..., <[0#2], 3>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2};{lower_key=[2];timestamp=3}];upper_key=[<type=max>#]}",
"[2]",
"[<type=max>#]",
"{Segments: [<[], 1>, ..., <[0#2], 3>], UpperKey: [0#<Max>]}"),
- std::make_tuple(
+ std::tuple(
"{segments=[{lower_key=[];timestamp=1};{lower_key=[1];timestamp=2};{lower_key=[2];timestamp=3};{lower_key=[3];timestamp=4};{lower_key=[4];timestamp=5};"
"{lower_key=[5];timestamp=6};{lower_key=[6];timestamp=7};{lower_key=[7];timestamp=8};{lower_key=[8];timestamp=9}];upper_key=[<type=max>#]}",
"[5]",
diff --git a/yt/yt/client/unittests/schema_ut.cpp b/yt/yt/client/unittests/schema_ut.cpp
index 2b5f2d5e8a..c1990743c2 100644
--- a/yt/yt/client/unittests/schema_ut.cpp
+++ b/yt/yt/client/unittests/schema_ut.cpp
@@ -311,7 +311,7 @@ TEST(TTableSchemaTest, ColumnSchemaValidation)
.SetExpression(TString("SomeExpression")));
// Key columns can't be aggregated.
- expectBad(
+ expectBad(
TColumnSchema("Name", EValueType::String)
.SetSortOrder(ESortOrder::Ascending)
.SetAggregate(TString("sum")));
diff --git a/yt/yt/client/unittests/validate_logical_type_ut.cpp b/yt/yt/client/unittests/validate_logical_type_ut.cpp
index dce4792430..68d19caa92 100644
--- a/yt/yt/client/unittests/validate_logical_type_ut.cpp
+++ b/yt/yt/client/unittests/validate_logical_type_ut.cpp
@@ -436,8 +436,8 @@ TEST(TValidateLogicalTypeTest, TestTaggedType)
auto taggedVariant = TaggedLogicalType(
"tag",
VariantTupleLogicalType({
- SimpleLogicalType(ESimpleLogicalValueType::Boolean),
- SimpleLogicalType(ESimpleLogicalValueType::String),
+ SimpleLogicalType(ESimpleLogicalValueType::Boolean),
+ SimpleLogicalType(ESimpleLogicalValueType::String),
})
);
diff --git a/yt/yt/client/unittests/ypath_ut.cpp b/yt/yt/client/unittests/ypath_ut.cpp
index 3a81f5e43c..bc74d5f7cc 100644
--- a/yt/yt/client/unittests/ypath_ut.cpp
+++ b/yt/yt/client/unittests/ypath_ut.cpp
@@ -287,9 +287,9 @@ TEST_F(TYPathTest, InvalidCases)
// get non-existent attribute from existent node
EXPECT_ANY_THROW({
- Set("/c", "{}");
- Get("/c/@some");
- });
+ Set("/c", "{}");
+ Get("/c/@some");
+ });
// remove non-existing child
EXPECT_ANY_THROW(Remove("/a"));
diff --git a/yt/yt/client/ya.make b/yt/yt/client/ya.make
index 73a8deb291..3acca6bfa2 100644
--- a/yt/yt/client/ya.make
+++ b/yt/yt/client/ya.make
@@ -141,6 +141,7 @@ SRCS(
queue_client/common.cpp
queue_client/config.cpp
queue_client/consumer_client.cpp
+ queue_client/helpers.cpp
queue_client/partition_reader.cpp
queue_client/queue_rowset.cpp
diff --git a/yt/yt/core/actions/future-inl.h b/yt/yt/core/actions/future-inl.h
index b3b006122d..5073d404ba 100644
--- a/yt/yt/core/actions/future-inl.h
+++ b/yt/yt/core/actions/future-inl.h
@@ -2210,8 +2210,8 @@ private:
}
if (Options_.CancelInputOnShortcut &&
- responseIndex < static_cast<int>(this->Futures_.size()) - 1 &&
- this->TryAcquireFuturesCancelLatch())
+ responseIndex < static_cast<int>(this->Futures_.size()) - 1 &&
+ this->TryAcquireFuturesCancelLatch())
{
this->CancelFutures(NYT::TError(
NYT::EErrorCode::FutureCombinerShortcut,
@@ -2247,7 +2247,7 @@ private:
}
if (Options_.CancelInputOnShortcut &&
- this->TryAcquireFuturesCancelLatch())
+ this->TryAcquireFuturesCancelLatch())
{
this->CancelFutures(NYT::TError(
NYT::EErrorCode::FutureCombinerShortcut,
diff --git a/yt/yt/core/actions/signal-inl.h b/yt/yt/core/actions/signal-inl.h
index cb87697f0d..337e760df8 100644
--- a/yt/yt/core/actions/signal-inl.h
+++ b/yt/yt/core/actions/signal-inl.h
@@ -165,7 +165,7 @@ bool TSingleShotCallbackList<TResult(TArgs...)>::Fire(TCallArgs&&... args)
if (Fired_.load(std::memory_order::acquire)) {
return false;
}
- Args_ = std::make_tuple(std::forward<TCallArgs>(args)...);
+ Args_ = std::tuple(std::forward<TCallArgs>(args)...);
callbacks.swap(Callbacks_);
Fired_.store(true, std::memory_order::release);
}
diff --git a/yt/yt/core/compression/zstd.cpp b/yt/yt/core/compression/zstd.cpp
index 24351eaca9..a22b4b682a 100644
--- a/yt/yt/core/compression/zstd.cpp
+++ b/yt/yt/core/compression/zstd.cpp
@@ -51,7 +51,7 @@ void ZstdCompress(int level, TSource* source, TBlob* output)
auto context = ZSTD_createCCtx();
auto contextGuard = Finally([&] () {
- ZSTD_freeCCtx(context);
+ ZSTD_freeCCtx(context);
});
{
diff --git a/yt/yt/core/concurrency/action_queue.cpp b/yt/yt/core/concurrency/action_queue.cpp
index 0377297265..057773cf36 100644
--- a/yt/yt/core/concurrency/action_queue.cpp
+++ b/yt/yt/core/concurrency/action_queue.cpp
@@ -631,10 +631,10 @@ private:
}
UnderlyingInvoker_->Invoke(BIND_NO_PROPAGATE(
- &TSuspendableInvoker::RunCallback,
- MakeStrong(this),
- Passed(std::move(callback)),
- Passed(std::move(guard))));
+ &TSuspendableInvoker::RunCallback,
+ MakeStrong(this),
+ Passed(std::move(callback)),
+ Passed(std::move(guard))));
}
SchedulingMore_ = false;
diff --git a/yt/yt/core/concurrency/coroutine-inl.h b/yt/yt/core/concurrency/coroutine-inl.h
index e3bc8757a6..df05e67b9d 100644
--- a/yt/yt/core/concurrency/coroutine-inl.h
+++ b/yt/yt/core/concurrency/coroutine-inl.h
@@ -39,7 +39,7 @@ const std::optional<R>& TCoroutine<R(TArgs...)>::Run(TParams&& ... params)
{
static_assert(sizeof...(TParams) == sizeof...(TArgs),
"TParams<> and TArgs<> have different length");
- Arguments_ = std::make_tuple(std::forward<TParams>(params)...);
+ Arguments_ = std::tuple(std::forward<TParams>(params)...);
JumpToCoroutine();
return Result_;
}
@@ -83,7 +83,7 @@ bool TCoroutine<void(TArgs...)>::Run(TParams&& ... params)
{
static_assert(sizeof...(TParams) == sizeof...(TArgs),
"TParams<> and TArgs<> have different length");
- Arguments_ = std::make_tuple(std::forward<TParams>(params)...);
+ Arguments_ = std::tuple(std::forward<TParams>(params)...);
JumpToCoroutine();
return Result_;
}
diff --git a/yt/yt/core/concurrency/new_fair_share_thread_pool.cpp b/yt/yt/core/concurrency/new_fair_share_thread_pool.cpp
index e5bcbc9775..f996602e61 100644
--- a/yt/yt/core/concurrency/new_fair_share_thread_pool.cpp
+++ b/yt/yt/core/concurrency/new_fair_share_thread_pool.cpp
@@ -420,7 +420,7 @@ public:
// TODO(lukyan): Use reader guard and update it to writer if needed.
auto guard = Guard(MappingLock_);
- auto [bucketIt, bucketInserted] = BucketMapping_.emplace(std::make_pair(poolName, bucketName), nullptr);
+ auto [bucketIt, bucketInserted] = BucketMapping_.emplace(std::pair(poolName, bucketName), nullptr);
auto bucket = bucketIt->second ? DangerousGetPtr(bucketIt->second) : nullptr;
if (!bucket) {
@@ -436,7 +436,7 @@ public:
void RemoveBucket(TBucket* bucket)
{
auto guard = Guard(MappingLock_);
- auto bucketIt = BucketMapping_.find(std::make_pair(bucket->PoolName, bucket->BucketName));
+ auto bucketIt = BucketMapping_.find(std::pair(bucket->PoolName, bucket->BucketName));
if (bucketIt != BucketMapping_.end() && bucketIt->second == bucket) {
BucketMapping_.erase(bucketIt);
diff --git a/yt/yt/core/concurrency/nonblocking_batcher-inl.h b/yt/yt/core/concurrency/nonblocking_batcher-inl.h
index 67bb4b3c7b..6dcabdaaa3 100644
--- a/yt/yt/core/concurrency/nonblocking_batcher-inl.h
+++ b/yt/yt/core/concurrency/nonblocking_batcher-inl.h
@@ -21,7 +21,7 @@ void TBatchSizeLimiter::Add(const T& /*element*/)
template <class... TLimiters>
TCompositeBatchLimiter<TLimiters...>::TCompositeBatchLimiter(TLimiters... limiters)
- : Limiters_(std::make_tuple(limiters...))
+ : Limiters_(std::tuple(limiters...))
{ }
template <class... TLimiters>
diff --git a/yt/yt/core/concurrency/unittests/scheduler_ut.cpp b/yt/yt/core/concurrency/unittests/scheduler_ut.cpp
index 2b202dde76..a36173babf 100644
--- a/yt/yt/core/concurrency/unittests/scheduler_ut.cpp
+++ b/yt/yt/core/concurrency/unittests/scheduler_ut.cpp
@@ -1607,10 +1607,10 @@ INSTANTIATE_TEST_SUITE_P(
Test,
TFairShareSchedulerTest,
::testing::Values(
- std::make_tuple(1, 5, 1, FSWorkTime),
- std::make_tuple(1, 7, 3, FSWorkTime),
- std::make_tuple(5, 7, 1, FSWorkTime),
- std::make_tuple(5, 7, 3, FSWorkTime)
+ std::tuple(1, 5, 1, FSWorkTime),
+ std::tuple(1, 7, 3, FSWorkTime),
+ std::tuple(5, 7, 1, FSWorkTime),
+ std::tuple(5, 7, 3, FSWorkTime)
));
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/crypto/tls.cpp b/yt/yt/core/crypto/tls.cpp
index 793b0571a1..a79a0c9458 100644
--- a/yt/yt/core/crypto/tls.cpp
+++ b/yt/yt/core/crypto/tls.cpp
@@ -409,7 +409,7 @@ private:
// NB: We should check for an error here, because Underylying_ might have failed already, and then
// we will loop on SSL_ERROR_WANT_READ forever.
if (HandshakeInProgress_ && Error_.IsOK()) {
- int sslResult = SSL_do_handshake(Ssl_);
+ int sslResult = SSL_do_handshake(Ssl_);
if (sslResult == 1) {
HandshakeInProgress_ = false;
} else {
@@ -427,7 +427,7 @@ private:
}
if (HandshakeInProgress_) {
- return;
+ return;
}
// Second condition acts as a poor-man backpressure.
diff --git a/yt/yt/core/http/stream.cpp b/yt/yt/core/http/stream.cpp
index 6637fb0b35..4820919f1f 100644
--- a/yt/yt/core/http/stream.cpp
+++ b/yt/yt/core/http/stream.cpp
@@ -98,7 +98,7 @@ TSharedRef THttpParser::Feed(const TSharedRef& input)
std::pair<int, int> THttpParser::GetVersion() const
{
- return std::make_pair<int, int>(Parser_.http_major, Parser_.http_minor);
+ return std::pair<int, int>(Parser_.http_major, Parser_.http_minor);
}
EStatusCode THttpParser::GetStatusCode() const
diff --git a/yt/yt/core/logging/log_manager.cpp b/yt/yt/core/logging/log_manager.cpp
index 021f7fc9aa..b31e28df5a 100644
--- a/yt/yt/core/logging/log_manager.cpp
+++ b/yt/yt/core/logging/log_manager.cpp
@@ -1056,7 +1056,7 @@ private:
const TCounter& GetWrittenEventsCounter(const TLogEvent& event)
{
- auto key = std::make_pair(event.Category->Name, event.Level);
+ auto key = std::pair(event.Category->Name, event.Level);
auto it = WrittenEventsCounters_.find(key);
if (it == WrittenEventsCounters_.end()) {
diff --git a/yt/yt/core/logging/unittests/logging_ut.cpp b/yt/yt/core/logging/unittests/logging_ut.cpp
index 68472ab0f7..fd0bf73423 100644
--- a/yt/yt/core/logging/unittests/logging_ut.cpp
+++ b/yt/yt/core/logging/unittests/logging_ut.cpp
@@ -1125,14 +1125,14 @@ TEST_P(TLoggingTagsTest, All)
INSTANTIATE_TEST_SUITE_P(ValueParametrized, TLoggingTagsTest,
::testing::Values(
- std::make_tuple(false, false, false, "Log message"),
- std::make_tuple(false, false, true, "Log message (TraceContextTag)"),
- std::make_tuple(false, true, false, "Log message (LoggerTag)"),
- std::make_tuple(false, true, true, "Log message (LoggerTag, TraceContextTag)"),
- std::make_tuple( true, false, false, "Log message (Value: 123)"),
- std::make_tuple( true, false, true, "Log message (Value: 123, TraceContextTag)"),
- std::make_tuple( true, true, false, "Log message (Value: 123, LoggerTag)"),
- std::make_tuple( true, true, true, "Log message (Value: 123, LoggerTag, TraceContextTag)")));
+ std::tuple(false, false, false, "Log message"),
+ std::tuple(false, false, true, "Log message (TraceContextTag)"),
+ std::tuple(false, true, false, "Log message (LoggerTag)"),
+ std::tuple(false, true, true, "Log message (LoggerTag, TraceContextTag)"),
+ std::tuple( true, false, false, "Log message (Value: 123)"),
+ std::tuple( true, false, true, "Log message (Value: 123, TraceContextTag)"),
+ std::tuple( true, true, false, "Log message (Value: 123, LoggerTag)"),
+ std::tuple( true, true, true, "Log message (Value: 123, LoggerTag, TraceContextTag)")));
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/misc/checksum.cpp b/yt/yt/core/misc/checksum.cpp
index e5b154e74f..5eba908d61 100644
--- a/yt/yt/core/misc/checksum.cpp
+++ b/yt/yt/core/misc/checksum.cpp
@@ -790,7 +790,7 @@ TFuture<void> TChecksumAsyncOutput::Close()
TFuture<void> TChecksumAsyncOutput::Write(const TSharedRef& block)
{
return UnderlyingStream_->Write(block)
- .Apply(BIND([&, this, this_ = MakeWeak(this)] {
+ .Apply(BIND([=, this, this_ = MakeStrong(this)] {
Checksum_ = NYT::GetChecksum(block, Checksum_);
}));
}
diff --git a/yt/yt/core/misc/error-inl.h b/yt/yt/core/misc/error-inl.h
index 2039e94514..486216be91 100644
--- a/yt/yt/core/misc/error-inl.h
+++ b/yt/yt/core/misc/error-inl.h
@@ -31,6 +31,13 @@ inline constexpr TErrorCode::operator int() const
template <class E>
requires std::is_enum_v<E>
+constexpr TErrorCode::operator E() const
+{
+ return static_cast<E>(Value_);
+}
+
+template <class E>
+requires std::is_enum_v<E>
constexpr bool operator == (TErrorCode lhs, E rhs)
{
return static_cast<int>(lhs) == static_cast<int>(rhs);
diff --git a/yt/yt/core/misc/error.h b/yt/yt/core/misc/error.h
index 9dba023408..fb30619a5a 100644
--- a/yt/yt/core/misc/error.h
+++ b/yt/yt/core/misc/error.h
@@ -41,6 +41,10 @@ public:
constexpr operator int() const;
+ template <class E>
+ requires std::is_enum_v<E>
+ constexpr operator E() const;
+
void Save(TStreamSaveContext& context) const;
void Load(TStreamLoadContext& context);
diff --git a/yt/yt/core/misc/protobuf_helpers-inl.h b/yt/yt/core/misc/protobuf_helpers-inl.h
index 0c8118f3ef..e8d74b6c6f 100644
--- a/yt/yt/core/misc/protobuf_helpers-inl.h
+++ b/yt/yt/core/misc/protobuf_helpers-inl.h
@@ -331,7 +331,7 @@ typename std::enable_if_t<!std::is_trivial_v<TValue>> SetPairValueImpl(TProtoPai
template <class TProtoPair, class TValue>
typename std::enable_if_t<std::is_trivial_v<TValue>> SetPairValueImpl(TProtoPair& pair, const TValue& value)
{
- pair->set_value(value);
+ pair->set_value(value);
}
template <class TSerializedArray, class T, class E, E Min, E Max>
diff --git a/yt/yt/core/misc/statistics-inl.h b/yt/yt/core/misc/statistics-inl.h
index 567b22f47a..d02287d943 100644
--- a/yt/yt/core/misc/statistics-inl.h
+++ b/yt/yt/core/misc/statistics-inl.h
@@ -39,7 +39,7 @@ void TTaggedStatistics<TTags>::AppendStatistics(const TStatistics& statistics, T
}
}
}
-
+
template <class TTags>
void TTaggedStatistics<TTags>::AppendTaggedSummary(const NYPath::TYPath& path, const TTaggedStatistics<TTags>::TTaggedSummaries& taggedSummaries)
{
@@ -48,11 +48,11 @@ void TTaggedStatistics<TTags>::AppendTaggedSummary(const NYPath::TYPath& path, c
Data_[path] = taggedSummaries;
return;
}
-
+
auto& currentTaggedSummaries = taggedSummariesIt->second;
for (const auto& [tags, summary] : taggedSummaries) {
if (auto summaryIt = currentTaggedSummaries.find(tags); summaryIt == currentTaggedSummaries.end()) {
- currentTaggedSummaries.insert(std::make_pair(tags, summary));
+ currentTaggedSummaries.insert(std::pair(tags, summary));
} else {
summaryIt->second.Merge(summary);
}
diff --git a/yt/yt/core/misc/unittests/arithmetic_formula_ut.cpp b/yt/yt/core/misc/unittests/arithmetic_formula_ut.cpp
index 3664ed1984..e1bdf8059d 100644
--- a/yt/yt/core/misc/unittests/arithmetic_formula_ut.cpp
+++ b/yt/yt/core/misc/unittests/arithmetic_formula_ut.cpp
@@ -31,46 +31,46 @@ INSTANTIATE_TEST_SUITE_P(
TArithmeticFormulaTestWithoutVariables,
::testing::Values(
// +, -, few /%, parens
- std::make_tuple("(((35)-35)+(47)+(12))/((13+(31))-(24-(37)-23)+(30-30-33+24-39))", 1),
- std::make_tuple("((49)-34+(44)-35+(11-28)-(40)%46+20+22)+((19-50-40)-13+(17))", -58),
- std::make_tuple("17%25-(23)-24+(45)+34-32+23-34-(10)", -4),
- std::make_tuple("31%26-42+22+(19+48-(40+28)+(27))-(45-21)+(15)+10+26%43", 38),
- std::make_tuple("((11)+46)-10%14-(29+43)-33-47+27+48+50-((19-18-20)+(46)-(29))", 22),
- std::make_tuple("(10)-28-13%21+32+34+(40-48+(32)%41)+(32%44)+(35)%37+50-20+(31)", 187),
- std::make_tuple("(48-29)-(44-(14)-35+28-16-((48)/13-(43)/22)-((12-41+32/45)+32+33-50-39))", -39),
+ std::tuple("(((35)-35)+(47)+(12))/((13+(31))-(24-(37)-23)+(30-30-33+24-39))", 1),
+ std::tuple("((49)-34+(44)-35+(11-28)-(40)%46+20+22)+((19-50-40)-13+(17))", -58),
+ std::tuple("17%25-(23)-24+(45)+34-32+23-34-(10)", -4),
+ std::tuple("31%26-42+22+(19+48-(40+28)+(27))-(45-21)+(15)+10+26%43", 38),
+ std::tuple("((11)+46)-10%14-(29+43)-33-47+27+48+50-((19-18-20)+(46)-(29))", 22),
+ std::tuple("(10)-28-13%21+32+34+(40-48+(32)%41)+(32%44)+(35)%37+50-20+(31)", 187),
+ std::tuple("(48-29)-(44-(14)-35+28-16-((48)/13-(43)/22)-((12-41+32/45)+32+33-50-39))", -39),
// all except /%
- std::make_tuple("(33-(35))*13|31<=43*37||(17+38)==!(34*(16)!=28!=15)<=50<17", 1),
- std::make_tuple("(12&&49&(17)|27)==20!=35&&46==34>=(!!(16)-41<(10)==11||11*11*19!=((30)<=(40)<=48))", 0),
- std::make_tuple("!!(37)||(27)<39&28<=25^16|(!40+40)^(47<15<25)<47^45+16==23!=17&&22<=!38!=14", 1),
- std::make_tuple("!!27!=15==(35||23||!!(40)&&18<=((17>=34)-38==(47))&&22>13|40*31!=40+(!38^43)&(34)|(27))", 1),
- std::make_tuple("(!(28)-(25)||49^(23>(21)==(36<=17)!=23>(27<=33))!=!!(47)||46^22+19<11>=15)==46", 0),
- std::make_tuple("(!24-(12)+24&(45)|(43))<=!28==(50&&(46)<21<(17))<=28-(20)<=29&&(28)==!(24)!=24<=(20<=37)", 0),
- std::make_tuple("16<46&40*30", 0),
- std::make_tuple("38>=(48)|(13>=30)|!!31!=21|(49!=(31)>=(36)==(33))>=((!(30)==24)*25||48)||!47!=18", 1),
- std::make_tuple("!22<23^((49)*33)!=50==!(32)||(49)||!(36)+(35)-26>=18>(!(31)>=21-(10||39)||(11)>=25)", 1),
+ std::tuple("(33-(35))*13|31<=43*37||(17+38)==!(34*(16)!=28!=15)<=50<17", 1),
+ std::tuple("(12&&49&(17)|27)==20!=35&&46==34>=(!!(16)-41<(10)==11||11*11*19!=((30)<=(40)<=48))", 0),
+ std::tuple("!!(37)||(27)<39&28<=25^16|(!40+40)^(47<15<25)<47^45+16==23!=17&&22<=!38!=14", 1),
+ std::tuple("!!27!=15==(35||23||!!(40)&&18<=((17>=34)-38==(47))&&22>13|40*31!=40+(!38^43)&(34)|(27))", 1),
+ std::tuple("(!(28)-(25)||49^(23>(21)==(36<=17)!=23>(27<=33))!=!!(47)||46^22+19<11>=15)==46", 0),
+ std::tuple("(!24-(12)+24&(45)|(43))<=!28==(50&&(46)<21<(17))<=28-(20)<=29&&(28)==!(24)!=24<=(20<=37)", 0),
+ std::tuple("16<46&40*30", 0),
+ std::tuple("38>=(48)|(13>=30)|!!31!=21|(49!=(31)>=(36)==(33))>=((!(30)==24)*25||48)||!47!=18", 1),
+ std::tuple("!22<23^((49)*33)!=50==!(32)||(49)||!(36)+(35)-26>=18>(!(31)>=21-(10||39)||(11)>=25)", 1),
// spaces
- std::make_tuple("( 14!=24 )< 27 <=44== 15*22", 0),
- std::make_tuple(" 24<36 >=( 41*48)<= ( !23!=16 )<=( 49- 34)", 1),
- std::make_tuple(" (34 *13 )!=(48 >= 37 ) <=( 43!=( 19 ) )- 34* 45", 1),
- std::make_tuple(" 13 * 50 +(14) <43 == 17 ==( !18 < 47 ) ", 0),
- std::make_tuple(" 44!=18 > 43 -( 41 )>=(34 )!= 30", 1),
- std::make_tuple(" (( 14)*(15 ) )+43 -!(23 )>= 36 > 33 <=(24 )", 1),
- std::make_tuple(" !24 != 43<(!50-34>= 49 )", 0),
- std::make_tuple(" ! 11>=43 > 19< 12 <((32)>39 )", 0),
- std::make_tuple("!14 ==46 <=22 !=(15 )< 31", 0),
- std::make_tuple("(( 38)>= 16 > 20>=(26) )<= 50 -33", 1),
- std::make_tuple(" 36> 37 == 12< !(11 )> 32 > 25+14 ", 1),
- std::make_tuple(" (26)>=38 +( !16> 28 )", 0),
- std::make_tuple(" 30 >(25) * 23 +26-( 20 )", 0),
- std::make_tuple("! 26<= 11<! 13 + 10 >( 26==36 )", 1),
- std::make_tuple("!10* ! 33 <16 <= 11", 1),
- std::make_tuple("(34 )- 50 * 11- 33 !=(26 )<= 16", 1),
- std::make_tuple(" !( 27)> 30 >=36== 44 != ! 18 <= 23 *35", 1),
- std::make_tuple("( 29 >= 12)<=( ! 35==17)", 0),
- std::make_tuple("!16 <= 23 ==! 47 <27 <=( (24)< 23 >= 36< 31 )", 1),
- std::make_tuple(" ! 12 >=17+ ( 25+ 10)<15 < 36", 1)
+ std::tuple("( 14!=24 )< 27 <=44== 15*22", 0),
+ std::tuple(" 24<36 >=( 41*48)<= ( !23!=16 )<=( 49- 34)", 1),
+ std::tuple(" (34 *13 )!=(48 >= 37 ) <=( 43!=( 19 ) )- 34* 45", 1),
+ std::tuple(" 13 * 50 +(14) <43 == 17 ==( !18 < 47 ) ", 0),
+ std::tuple(" 44!=18 > 43 -( 41 )>=(34 )!= 30", 1),
+ std::tuple(" (( 14)*(15 ) )+43 -!(23 )>= 36 > 33 <=(24 )", 1),
+ std::tuple(" !24 != 43<(!50-34>= 49 )", 0),
+ std::tuple(" ! 11>=43 > 19< 12 <((32)>39 )", 0),
+ std::tuple("!14 ==46 <=22 !=(15 )< 31", 0),
+ std::tuple("(( 38)>= 16 > 20>=(26) )<= 50 -33", 1),
+ std::tuple(" 36> 37 == 12< !(11 )> 32 > 25+14 ", 1),
+ std::tuple(" (26)>=38 +( !16> 28 )", 0),
+ std::tuple(" 30 >(25) * 23 +26-( 20 )", 0),
+ std::tuple("! 26<= 11<! 13 + 10 >( 26==36 )", 1),
+ std::tuple("!10* ! 33 <16 <= 11", 1),
+ std::tuple("(34 )- 50 * 11- 33 !=(26 )<= 16", 1),
+ std::tuple(" !( 27)> 30 >=36== 44 != ! 18 <= 23 *35", 1),
+ std::tuple("( 29 >= 12)<=( ! 35==17)", 0),
+ std::tuple("!16 <= 23 ==! 47 <27 <=( (24)< 23 >= 36< 31 )", 1),
+ std::tuple(" ! 12 >=17+ ( 25+ 10)<15 < 36", 1)
));
INSTANTIATE_TEST_SUITE_P(
@@ -78,34 +78,34 @@ INSTANTIATE_TEST_SUITE_P(
TArithmeticFormulaTestWithoutVariables,
::testing::Values(
// some manual stuff
- std::make_tuple("1+1", 2),
- std::make_tuple("1+1+1", 3),
- std::make_tuple("10-1", 9),
- std::make_tuple("10-5-3", 2),
- std::make_tuple( "10 -5 --2", 7),
- std::make_tuple("( 1) + -2 ",-1),
- std::make_tuple("(((((5*5)))))", 25),
- std::make_tuple( "2 * 2 + 10 / 5 ", 6),
- std::make_tuple("7 % 4 * 4", 12),
- std::make_tuple("7 % (4 * 4)", 7),
- std::make_tuple("1&&2&&3||6", 1),
- std::make_tuple("1&2&3|6", 6),
- std::make_tuple("!!(1||(2))", 1),
- std::make_tuple("(1)-1", 0),
- std::make_tuple("(1) --1", 2),
- std::make_tuple("9223372036854775807", std::numeric_limits<i64>::max()),
- std::make_tuple("-9223372036854775808", std::numeric_limits<i64>::min()),
- std::make_tuple("10 in (10, 20, 30)", 1),
- std::make_tuple("10 in 10, 20, 30", 1),
- std::make_tuple("5+10 in 12+3", 1),
- std::make_tuple("5+(10 in 12)+3", 8),
- std::make_tuple("10 in 5, 6, 7+4, 2+8", 1),
- std::make_tuple("11 in 5, 6, 7+4, 2+8", 1),
-
- std::make_tuple("1 + %true", 2),
- std::make_tuple("%true+1", 2),
- std::make_tuple("10%%true", 0),
- std::make_tuple("10 % %true", 0)
+ std::tuple("1+1", 2),
+ std::tuple("1+1+1", 3),
+ std::tuple("10-1", 9),
+ std::tuple("10-5-3", 2),
+ std::tuple( "10 -5 --2", 7),
+ std::tuple("( 1) + -2 ",-1),
+ std::tuple("(((((5*5)))))", 25),
+ std::tuple( "2 * 2 + 10 / 5 ", 6),
+ std::tuple("7 % 4 * 4", 12),
+ std::tuple("7 % (4 * 4)", 7),
+ std::tuple("1&&2&&3||6", 1),
+ std::tuple("1&2&3|6", 6),
+ std::tuple("!!(1||(2))", 1),
+ std::tuple("(1)-1", 0),
+ std::tuple("(1) --1", 2),
+ std::tuple("9223372036854775807", std::numeric_limits<i64>::max()),
+ std::tuple("-9223372036854775808", std::numeric_limits<i64>::min()),
+ std::tuple("10 in (10, 20, 30)", 1),
+ std::tuple("10 in 10, 20, 30", 1),
+ std::tuple("5+10 in 12+3", 1),
+ std::tuple("5+(10 in 12)+3", 8),
+ std::tuple("10 in 5, 6, 7+4, 2+8", 1),
+ std::tuple("11 in 5, 6, 7+4, 2+8", 1),
+
+ std::tuple("1 + %true", 2),
+ std::tuple("%true+1", 2),
+ std::tuple("10%%true", 0),
+ std::tuple("10 % %true", 0)
));
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp b/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp
index 79256217af..0a48a2c68e 100644
--- a/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp
+++ b/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp
@@ -760,22 +760,22 @@ TEST(TAsyncSlruGhostCacheTest, MoveAssignCookie)
// Ensure that all the necessary items are present in large ghost, but absent in main
// cache and small ghost.
- for (int index = 0; index < 5; ++index) {
+ for (int index = 0; index < 5; ++index) {
auto cookie = cache->BeginInsert(index);
ASSERT_TRUE(cookie.IsActive());
cookie.EndInsert(New<TSimpleCachedValue>(
/*key*/ index,
/*value*/ 42,
/*weight*/ 1));
- }
- {
+ }
+ {
auto cookie = cache->BeginInsert(43);
ASSERT_TRUE(cookie.IsActive());
cookie.EndInsert(New<TSimpleCachedValue>(
/*key*/ 43,
/*value*/ 100500,
/*weight*/ 101));
- }
+ }
for (int index = 0; index < 5; ++index) {
auto otherCookie = cache->BeginInsert(index);
diff --git a/yt/yt/core/misc/unittests/boolean_formula_ut.cpp b/yt/yt/core/misc/unittests/boolean_formula_ut.cpp
index 8b3cad6858..c4faaecca0 100644
--- a/yt/yt/core/misc/unittests/boolean_formula_ut.cpp
+++ b/yt/yt/core/misc/unittests/boolean_formula_ut.cpp
@@ -35,31 +35,31 @@ INSTANTIATE_TEST_SUITE_P(
TBooleanFormulaTest,
TBooleanFormulaTest,
::testing::Values(
- std::make_tuple("", std::vector<TString>{}, true),
- std::make_tuple("", std::vector<TString>{"b"}, true),
- std::make_tuple("a", std::vector<TString>{"b"}, false),
- std::make_tuple("!a", std::vector<TString>{"b"}, true),
- std::make_tuple("b", std::vector<TString>{"b"}, true),
- std::make_tuple("a|b", std::vector<TString>{"b"}, true),
- std::make_tuple("a & b", std::vector<TString>{"b"}, false),
- std::make_tuple("(b)", std::vector<TString>{"b"}, true),
- std::make_tuple("a|(a|b)", std::vector<TString>{"b"}, true),
- std::make_tuple("(a|b)&(!a&b)", std::vector<TString>{"b"}, true),
- std::make_tuple("a&b", std::vector<TString>{"a", "b"}, true),
- std::make_tuple("(a|c)&(b|c)", std::vector<TString>{"a", "b"}, true),
- std::make_tuple("(a|b)&c", std::vector<TString>{"a", "b"}, false),
- std::make_tuple("a|b|c", std::vector<TString>{"b"}, true),
- std::make_tuple("!a & b & !c", std::vector<TString>{"b"}, true),
- std::make_tuple("var-1 | !var/2", std::vector<TString>{"var-1"}, true),
- std::make_tuple("var-1 | !var/2", std::vector<TString>{"var/2"}, false),
- std::make_tuple("var-1 | !var/2", std::vector<TString>{}, true),
- std::make_tuple("!in-", std::vector<TString>{}, true),
- std::make_tuple("in/|x", std::vector<TString>{"in/"}, true),
- std::make_tuple("%true", std::vector<TString>{""}, true),
- std::make_tuple("%false", std::vector<TString>{"false"}, false),
- std::make_tuple("%true|%false", std::vector<TString>{""}, true),
- std::make_tuple("a.b.c-d.e:1234", std::vector<TString>{"a.b.c-d.e:1234"}, true),
- std::make_tuple("!a.b.c-d.e:1234", std::vector<TString>{"a.b.c-d.e:1234"}, false)
+ std::tuple("", std::vector<TString>{}, true),
+ std::tuple("", std::vector<TString>{"b"}, true),
+ std::tuple("a", std::vector<TString>{"b"}, false),
+ std::tuple("!a", std::vector<TString>{"b"}, true),
+ std::tuple("b", std::vector<TString>{"b"}, true),
+ std::tuple("a|b", std::vector<TString>{"b"}, true),
+ std::tuple("a & b", std::vector<TString>{"b"}, false),
+ std::tuple("(b)", std::vector<TString>{"b"}, true),
+ std::tuple("a|(a|b)", std::vector<TString>{"b"}, true),
+ std::tuple("(a|b)&(!a&b)", std::vector<TString>{"b"}, true),
+ std::tuple("a&b", std::vector<TString>{"a", "b"}, true),
+ std::tuple("(a|c)&(b|c)", std::vector<TString>{"a", "b"}, true),
+ std::tuple("(a|b)&c", std::vector<TString>{"a", "b"}, false),
+ std::tuple("a|b|c", std::vector<TString>{"b"}, true),
+ std::tuple("!a & b & !c", std::vector<TString>{"b"}, true),
+ std::tuple("var-1 | !var/2", std::vector<TString>{"var-1"}, true),
+ std::tuple("var-1 | !var/2", std::vector<TString>{"var/2"}, false),
+ std::tuple("var-1 | !var/2", std::vector<TString>{}, true),
+ std::tuple("!in-", std::vector<TString>{}, true),
+ std::tuple("in/|x", std::vector<TString>{"in/"}, true),
+ std::tuple("%true", std::vector<TString>{""}, true),
+ std::tuple("%false", std::vector<TString>{"false"}, false),
+ std::tuple("%true|%false", std::vector<TString>{""}, true),
+ std::tuple("a.b.c-d.e:1234", std::vector<TString>{"a.b.c-d.e:1234"}, true),
+ std::tuple("!a.b.c-d.e:1234", std::vector<TString>{"a.b.c-d.e:1234"}, false)
));
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/misc/unittests/concurrent_cache_ut.cpp b/yt/yt/core/misc/unittests/concurrent_cache_ut.cpp
index 007b51c103..af1e1ceef4 100644
--- a/yt/yt/core/misc/unittests/concurrent_cache_ut.cpp
+++ b/yt/yt/core/misc/unittests/concurrent_cache_ut.cpp
@@ -139,9 +139,9 @@ INSTANTIATE_TEST_SUITE_P(
Simple,
TConcurrentCacheTest,
::testing::Values(
- std::make_tuple(2, 1, 1000, false),
- std::make_tuple(2, 5, 1000, false),
- std::make_tuple(2, 5, 1000, true)
+ std::tuple(2, 1, 1000, false),
+ std::tuple(2, 5, 1000, false),
+ std::tuple(2, 5, 1000, true)
));
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/misc/unittests/hyperloglog_ut.cpp b/yt/yt/core/misc/unittests/hyperloglog_ut.cpp
index 00eec04ede..188b4ec24f 100644
--- a/yt/yt/core/misc/unittests/hyperloglog_ut.cpp
+++ b/yt/yt/core/misc/unittests/hyperloglog_ut.cpp
@@ -34,7 +34,7 @@ std::pair<THyperLogLog<8>, int> GenerateHyperLogLog(
hll.Add(FarmFingerprint(n));
}
- return std::make_pair(hll, cardinality);
+ return std::pair(hll, cardinality);
}
TEST_P(THyperLogLogTest, Random)
diff --git a/yt/yt/core/misc/unittests/time_formula_ut.cpp b/yt/yt/core/misc/unittests/time_formula_ut.cpp
index 08378c2e2e..c2780f9507 100644
--- a/yt/yt/core/misc/unittests/time_formula_ut.cpp
+++ b/yt/yt/core/misc/unittests/time_formula_ut.cpp
@@ -31,14 +31,14 @@ INSTANTIATE_TEST_SUITE_P(
TTimeFormulaParseTest,
TTimeFormulaParseTest,
::testing::Values(
- std::make_tuple("", true),
- std::make_tuple("hours == 0", true),
- std::make_tuple("minutes == 0", true),
- std::make_tuple("hours % 2 == 0 && minutes == 1", true),
- std::make_tuple("hours * 100 + minutes >= 1030", true),
- std::make_tuple("seconds < 10", false),
- std::make_tuple("HOURS > 10", false),
- std::make_tuple("hours ++ 1", false)
+ std::tuple("", true),
+ std::tuple("hours == 0", true),
+ std::tuple("minutes == 0", true),
+ std::tuple("hours % 2 == 0 && minutes == 1", true),
+ std::tuple("hours * 100 + minutes >= 1030", true),
+ std::tuple("seconds < 10", false),
+ std::tuple("HOURS > 10", false),
+ std::tuple("hours ++ 1", false)
));
class TTimeFormulaCorrectnessTest
@@ -73,12 +73,12 @@ INSTANTIATE_TEST_SUITE_P(
TTimeFormulaCorrectnessTest,
TTimeFormulaCorrectnessTest,
::testing::Values(
- std::make_tuple("1", 24 * 60),
- std::make_tuple("hours == 0", 60),
- std::make_tuple("minutes == 0", 24),
- std::make_tuple("hours % 2 == 0 && minutes == 1", 12),
- std::make_tuple("hours * 100 + minutes >= 1030", 24 * 60 - (10 * 60 + 30)),
- std::make_tuple("minutes % 5 == 3 || minutes % 5 == 0", 24 * 60 / 5 * 2)
+ std::tuple("1", 24 * 60),
+ std::tuple("hours == 0", 60),
+ std::tuple("minutes == 0", 24),
+ std::tuple("hours % 2 == 0 && minutes == 1", 12),
+ std::tuple("hours * 100 + minutes >= 1030", 24 * 60 - (10 * 60 + 30)),
+ std::tuple("minutes % 5 == 3 || minutes % 5 == 0", 24 * 60 / 5 * 2)
));
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/net/connection.cpp b/yt/yt/core/net/connection.cpp
index d0018dbbe8..0b60d57298 100644
--- a/yt/yt/core/net/connection.cpp
+++ b/yt/yt/core/net/connection.cpp
@@ -213,7 +213,7 @@ public:
void SetResult() override
{
- ResultPromise_.Set(std::make_pair(Position_, RemoteAddress_));
+ ResultPromise_.Set(std::pair(Position_, RemoteAddress_));
}
TFuture<std::pair<size_t, TNetworkAddress>> ToFuture() const
@@ -1179,7 +1179,7 @@ std::pair<IConnectionPtr, IConnectionPtr> CreateConnectionPair(const IPollerPtr&
auto first = New<TFDConnection>(fds[0], address0, address1, poller);
auto second = New<TFDConnection>(fds[1], address1, address0, poller);
- return std::make_pair(std::move(first), std::move(second));
+ return std::pair(std::move(first), std::move(second));
} catch (...) {
YT_VERIFY(TryClose(fds[0], false));
YT_VERIFY(TryClose(fds[1], false));
diff --git a/yt/yt/core/net/listener.cpp b/yt/yt/core/net/listener.cpp
index 7a4bda3a64..8c74d6e4e4 100644
--- a/yt/yt/core/net/listener.cpp
+++ b/yt/yt/core/net/listener.cpp
@@ -98,7 +98,7 @@ public:
}
for (auto& promise : queue) {
- promise.Set(Error_);
+ promise.Set(Error_);
}
}
diff --git a/yt/yt/core/net/socket.cpp b/yt/yt/core/net/socket.cpp
index 26790df13e..ee46074ec2 100644
--- a/yt/yt/core/net/socket.cpp
+++ b/yt/yt/core/net/socket.cpp
@@ -113,8 +113,8 @@ SOCKET CreateTcpServerSocket()
auto lastError = LastSystemError();
SafeClose(serverSocket, false);
THROW_ERROR_EXCEPTION(
- NRpc::EErrorCode::TransportError,
- "Failed to configure IPv6 protocol")
+ NRpc::EErrorCode::TransportError,
+ "Failed to configure IPv6 protocol")
<< TError::FromSystem(lastError);
}
}
diff --git a/yt/yt/core/rpc/dynamic_channel_pool.cpp b/yt/yt/core/rpc/dynamic_channel_pool.cpp
index f5d3918853..4ab87efe91 100644
--- a/yt/yt/core/rpc/dynamic_channel_pool.cpp
+++ b/yt/yt/core/rpc/dynamic_channel_pool.cpp
@@ -67,9 +67,9 @@ public:
BIND(&TImpl::CreateChannel, Unretained(this)),
Logger))
, RandomPeerRotationExecutor_(New<TPeriodicExecutor>(
- TDispatcher::Get()->GetLightInvoker(),
- BIND(&TDynamicChannelPool::TImpl::MaybeEvictRandomPeer, MakeWeak(this)),
- Config_->RandomPeerEvictionPeriod))
+ TDispatcher::Get()->GetLightInvoker(),
+ BIND(&TDynamicChannelPool::TImpl::MaybeEvictRandomPeer, MakeWeak(this)),
+ Config_->RandomPeerEvictionPeriod))
{
RandomPeerRotationExecutor_->Start();
}
diff --git a/yt/yt/core/rpc/grpc/channel.cpp b/yt/yt/core/rpc/grpc/channel.cpp
index 1d09a0d249..9a704294f1 100644
--- a/yt/yt/core/rpc/grpc/channel.cpp
+++ b/yt/yt/core/rpc/grpc/channel.cpp
@@ -34,7 +34,7 @@ using namespace NBus;
////////////////////////////////////////////////////////////////////////////////
class TGrpcCallTracer final
- : public grpc_core::ServerCallTracer
+ : public grpc_core::ClientCallTracer::CallAttemptTracer
{
public:
void RecordAnnotation(y_absl::string_view /*annotation*/) override
@@ -100,10 +100,12 @@ public:
}
void RecordReceivedTrailingMetadata(
- grpc_metadata_batch* /*recv_trailing_metadata*/) override
+ y_absl::Status /*status*/,
+ grpc_metadata_batch* /*recv_trailing_metadata*/,
+ const grpc_transport_stream_stats* /*transport_stream_stats*/) override
{ }
- void RecordEnd(const grpc_call_final_info* /*final_info*/) override
+ void RecordEnd(const gpr_timespec& /*latency*/) override
{ }
private:
diff --git a/yt/yt/core/rpc/protocol_version.cpp b/yt/yt/core/rpc/protocol_version.cpp
index 179555f67d..80ef534547 100644
--- a/yt/yt/core/rpc/protocol_version.cpp
+++ b/yt/yt/core/rpc/protocol_version.cpp
@@ -46,7 +46,7 @@ bool operator != (const TProtocolVersion& lhs, const TProtocolVersion& rhs)
void FormatValue(TStringBuilderBase* builder, TProtocolVersion version, TStringBuf /*spec*/)
{
- builder->AppendFormat("%v.%v", version.Major, version.Minor);
+ builder->AppendFormat("%v.%v", version.Major, version.Minor);
}
TString ToString(TProtocolVersion version)
diff --git a/yt/yt/core/rpc/response_keeper.cpp b/yt/yt/core/rpc/response_keeper.cpp
index e2525ca596..2ebb194ab9 100644
--- a/yt/yt/core/rpc/response_keeper.cpp
+++ b/yt/yt/core/rpc/response_keeper.cpp
@@ -297,7 +297,7 @@ private:
auto result = DoFindRequest(id, isRetry);
if (!result) {
- EmplaceOrCrash(PendingResponses_, std::make_pair(id, NewPromise<TSharedRefArray>()));
+ EmplaceOrCrash(PendingResponses_, std::pair(id, NewPromise<TSharedRefArray>()));
}
return result;
}
diff --git a/yt/yt/core/rpc/service_detail.cpp b/yt/yt/core/rpc/service_detail.cpp
index 46567c3fcd..b17a6899ee 100644
--- a/yt/yt/core/rpc/service_detail.cpp
+++ b/yt/yt/core/rpc/service_detail.cpp
@@ -2305,11 +2305,11 @@ void TServiceBase::OnDiscoverRequestReplyDelayReached(TCtxDiscoverPtr context)
auto payload = GetDiscoverRequestPayload(context);
auto it = DiscoverRequestsByPayload_.find(payload);
if (it != DiscoverRequestsByPayload_.end()) {
- auto& requestSet = it->second;
- if (requestSet.Has(context)) {
- requestSet.Remove(context);
- ReplyDiscoverRequest(context, IsUp(context));
- }
+ auto& requestSet = it->second;
+ if (requestSet.Has(context)) {
+ requestSet.Remove(context);
+ ReplyDiscoverRequest(context, IsUp(context));
+ }
}
}
diff --git a/yt/yt/core/rpc/viable_peer_registry.cpp b/yt/yt/core/rpc/viable_peer_registry.cpp
index 118e20efa0..77c840fb67 100644
--- a/yt/yt/core/rpc/viable_peer_registry.cpp
+++ b/yt/yt/core/rpc/viable_peer_registry.cpp
@@ -175,7 +175,7 @@ public:
return nullptr;
}
- auto it = HashToActiveChannel_.lower_bound(std::make_pair(hash, TString()));
+ auto it = HashToActiveChannel_.lower_bound(std::pair(hash, TString()));
auto rebaseIt = [&] {
if (it == HashToActiveChannel_.end()) {
it = HashToActiveChannel_.begin();
@@ -528,7 +528,7 @@ private:
// Save the created channel for the given address for sticky requests.
GeneratePeerHashes(address, [&] (size_t hash) {
- HashToActiveChannel_[std::make_pair(hash, address)] = channel;
+ HashToActiveChannel_[std::pair(hash, address)] = channel;
});
// Save the channel for the given address at its priority.
@@ -554,7 +554,7 @@ private:
}
GeneratePeerHashes(address, [&] (size_t hash) {
- HashToActiveChannel_.erase(std::make_pair(hash, address));
+ HashToActiveChannel_.erase(std::pair(hash, address));
});
auto activePeersForPriorityIt = PriorityToActivePeers_.find(activePeerIt->second);
diff --git a/yt/yt/core/test_framework/framework.h b/yt/yt/core/test_framework/framework.h
index 61c8f1093d..1d59061bc9 100644
--- a/yt/yt/core/test_framework/framework.h
+++ b/yt/yt/core/test_framework/framework.h
@@ -189,11 +189,11 @@ void RunAndTrackFiber(NYT::TClosure closure);
// Wraps tests in an extra fiber and awaits termination. Adapted from `gtest.h`.
#define TEST_W_(test_case_name, test_name, parent_class, parent_id)\
class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
- public:\
+public:\
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)(const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)&) = delete;\
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)& operator= (const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)&) = delete;\
- private:\
+private:\
virtual void TestBody();\
void TestInnerBody();\
static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
diff --git a/yt/yt/core/tracing/trace_context.h b/yt/yt/core/tracing/trace_context.h
index cad13020ef..18acf3849e 100644
--- a/yt/yt/core/tracing/trace_context.h
+++ b/yt/yt/core/tracing/trace_context.h
@@ -70,7 +70,7 @@ DEFINE_ENUM(ETraceContextState,
*
* \note Thread affininty: any unless noted otherwise.
*/
- class TTraceContext
+class TTraceContext
: public TRefCounted
{
public:
diff --git a/yt/yt/core/ypath/unittests/tokenizer_ut.cpp b/yt/yt/core/ypath/unittests/tokenizer_ut.cpp
index 913646c0fa..f6941294bf 100644
--- a/yt/yt/core/ypath/unittests/tokenizer_ut.cpp
+++ b/yt/yt/core/ypath/unittests/tokenizer_ut.cpp
@@ -202,7 +202,7 @@ TEST_F(TYPathTokenizerTest, InvalidEscapeSequences)
TEST(TYPathHelpersTest, DirNameAndBaseName)
{
auto toPair = [] (auto lhs, auto rhs) {
- return std::make_pair(TString(lhs), TString(rhs));
+ return std::pair(TString(lhs), TString(rhs));
};
EXPECT_EQ(DirNameAndBaseName("//path/to/smth"), toPair("//path/to", "smth"));
diff --git a/yt/yt/core/yson/protobuf_interop.cpp b/yt/yt/core/yson/protobuf_interop.cpp
index 400d4a8f73..f9d32b34d5 100644
--- a/yt/yt/core/yson/protobuf_interop.cpp
+++ b/yt/yt/core/yson/protobuf_interop.cpp
@@ -276,7 +276,7 @@ public:
int fieldNumber,
const TProtobufMessageBytesFieldConverter& converter)
{
- EmplaceOrCrash(MessageFieldConverterMap_, std::make_pair(descriptor, fieldNumber), converter);
+ EmplaceOrCrash(MessageFieldConverterMap_, std::pair(descriptor, fieldNumber), converter);
}
//! This method is called while reflecting types.
@@ -303,7 +303,7 @@ public:
VERIFY_SPINLOCK_AFFINITY(Lock_);
auto fieldNumber = descriptor->field(fieldIndex)->number();
- auto it = MessageFieldConverterMap_.find(std::make_pair(descriptor, fieldNumber));
+ auto it = MessageFieldConverterMap_.find(std::pair(descriptor, fieldNumber));
if (it == MessageFieldConverterMap_.end()) {
return std::nullopt;
} else {
@@ -1014,11 +1014,11 @@ protected:
data);
return;
case EUtf8Check::ThrowOnFail:
- THROW_ERROR_EXCEPTION("String field got non UTF-8 value (Path: %v, Value: %v)",
- YPathStack_.GetHumanReadablePath(),
- data)
+ THROW_ERROR_EXCEPTION("String field got non UTF-8 value (Path: %v)",
+ YPathStack_.GetHumanReadablePath())
<< TErrorAttribute("ypath", YPathStack_.GetPath())
- << TErrorAttribute("proto_field", fieldFullName);
+ << TErrorAttribute("proto_field", fieldFullName)
+ << TErrorAttribute("non_utf8_string", data);
}
}
};
diff --git a/yt/yt/core/ytree/helpers.cpp b/yt/yt/core/ytree/helpers.cpp
index cd3bb2ce7f..c8c794a22e 100644
--- a/yt/yt/core/ytree/helpers.cpp
+++ b/yt/yt/core/ytree/helpers.cpp
@@ -334,7 +334,7 @@ std::vector<IAttributeDictionary::TKeyValuePair> ListAttributesPairs(const IAttr
for (const auto& key : keys) {
auto value = attributes.FindYson(key);
if (value) {
- result.push_back(std::make_pair(key, value));
+ result.push_back(std::pair(key, value));
}
}
return result;
diff --git a/yt/yt/core/ytree/unittests/serialize_ut.cpp b/yt/yt/core/ytree/unittests/serialize_ut.cpp
index 898eadf5d9..965ccf36c0 100644
--- a/yt/yt/core/ytree/unittests/serialize_ut.cpp
+++ b/yt/yt/core/ytree/unittests/serialize_ut.cpp
@@ -351,7 +351,7 @@ TEST(TSerializationTest, Deque)
TEST(TSerializationTest, Pair)
{
- auto original = std::make_pair<size_t, TString>(1U, "Second");
+ auto original = std::pair<size_t, TString>(1U, "Second");
TestSerializationDeserialization(original);
}
@@ -370,7 +370,7 @@ TEST(TSerializationTest, Array)
TEST(TSerializationTest, Tuple)
{
- auto original = std::make_tuple<int, TString, size_t>(43, "TString", 343U);
+ auto original = std::tuple<int, TString, size_t>(43, "TString", 343U);
TestSerializationDeserialization(original);
TestSerializationDeserialization(original, EYsonType::ListFragment);
}
@@ -378,9 +378,9 @@ TEST(TSerializationTest, Tuple)
TEST(TSerializationTest, VectorOfTuple)
{
std::vector<std::tuple<int, TString, size_t>> original{
- std::make_tuple<int, TString, size_t>(43, "First", 343U),
- std::make_tuple<int, TString, size_t>(0, "Second", 7U),
- std::make_tuple<int, TString, size_t>(2323, "Third", 9U)
+ std::tuple<int, TString, size_t>(43, "First", 343U),
+ std::tuple<int, TString, size_t>(0, "Second", 7U),
+ std::tuple<int, TString, size_t>(2323, "Third", 9U)
};
TestSerializationDeserialization(original);
diff --git a/yt/yt/core/ytree/virtual.cpp b/yt/yt/core/ytree/virtual.cpp
index 97fa863e02..0d331fd764 100644
--- a/yt/yt/core/ytree/virtual.cpp
+++ b/yt/yt/core/ytree/virtual.cpp
@@ -356,7 +356,7 @@ i64 TCompositeMapService::GetSize() const
IYPathServicePtr TCompositeMapService::FindItemService(TStringBuf key) const
{
- return Impl_->FindItemService(key);
+ return Impl_->FindItemService(key);
}
void TCompositeMapService::ListSystemAttributes(std::vector<TAttributeDescriptor>* descriptors)
diff --git a/yt/yt/core/ytree/ypath_detail.cpp b/yt/yt/core/ytree/ypath_detail.cpp
index 644bf1632a..4d6fb4ba50 100644
--- a/yt/yt/core/ytree/ypath_detail.cpp
+++ b/yt/yt/core/ytree/ypath_detail.cpp
@@ -364,7 +364,7 @@ std::vector<IAttributeDictionary::TKeyValuePair> TSupportsAttributes::TCombinedA
auto value = provider->FindBuiltinAttribute(descriptor.InternedKey);
if (value) {
auto key = descriptor.InternedKey.Unintern();
- pairs.push_back(std::make_pair(std::move(key), std::move(value)));
+ pairs.push_back(std::pair(std::move(key), std::move(value)));
}
}
}
diff --git a/yt/yt/core/ytree/ypath_service.cpp b/yt/yt/core/ytree/ypath_service.cpp
index 6cc9caf9ff..63c407e4a5 100644
--- a/yt/yt/core/ytree/ypath_service.cpp
+++ b/yt/yt/core/ytree/ypath_service.cpp
@@ -437,12 +437,12 @@ private:
}));
}
- void ListAttribute(const TYPath& /*path*/, TReqList* /*request*/, TRspList* /*response*/, const TCtxListPtr& context) override
- {
+ void ListAttribute(const TYPath& /*path*/, TReqList* /*request*/, TRspList* /*response*/, const TCtxListPtr& context) override
+ {
// Execute fallback.
auto node = BuildNodeFromProducer();
ExecuteVerb(node, context->GetUnderlyingContext());
- }
+ }
void ExistsRecursive(const TYPath& path, TReqExists* /*request*/, TRspExists* /*response*/, const TCtxExistsPtr& context) override
{
diff --git a/yt/yt/library/erasure/impl/unittests/erasure_stability_ut.cpp b/yt/yt/library/erasure/impl/unittests/erasure_stability_ut.cpp
index f32029a413..d375c8b245 100644
--- a/yt/yt/library/erasure/impl/unittests/erasure_stability_ut.cpp
+++ b/yt/yt/library/erasure/impl/unittests/erasure_stability_ut.cpp
@@ -33,7 +33,7 @@ TEST_P(TErasureStabilityTest, TErasureStabilityTest)
auto* codec = FindCodec(std::get<0>(params));
if (!codec) {
- return;
+ return;
}
std::vector<TSharedRef> dataParts;
@@ -55,19 +55,19 @@ INSTANTIATE_TEST_SUITE_P(
TErasureStabilityTest,
TErasureStabilityTest,
::testing::Values(
- std::make_tuple(
+ std::tuple(
ECodec::IsaReedSolomon_3_3,
std::vector<unsigned char>{59, 252, 207}),
- std::make_tuple(
+ std::tuple(
ECodec::ReedSolomon_6_3,
std::vector<unsigned char>{194, 8, 51}),
- std::make_tuple(
+ std::tuple(
ECodec::JerasureLrc_12_2_2,
std::vector<unsigned char>{194, 201, 87, 67}),
- std::make_tuple(
+ std::tuple(
ECodec::IsaLrc_12_2_2,
std::vector<unsigned char>{194, 201, 104, 219}),
- std::make_tuple(
+ std::tuple(
ECodec::IsaReedSolomon_6_3,
std::vector<unsigned char>{194, 60, 234})));
diff --git a/yt/yt/library/formats/arrow_parser.cpp b/yt/yt/library/formats/arrow_parser.cpp
index d5ec6cacd7..2952630baf 100644
--- a/yt/yt/library/formats/arrow_parser.cpp
+++ b/yt/yt/library/formats/arrow_parser.cpp
@@ -214,7 +214,7 @@ private:
buffer,
stringElement.data(),
stringElement.size());
- bufferForStringLikeValues_->Advance(stringElement.size());
+ bufferForStringLikeValues_->Advance(stringElement.size());
auto value = TStringBuf(buffer, stringElement.size());
RowValues_[rowIndex] = MakeUnversionedStringValue(value, ColumnId_);
@@ -800,7 +800,7 @@ void PrepareArrayForComplexType(
buffer,
valueBuffer.Data(),
valueBuffer.Size());
- bufferForStringLikeValues->Advance(valueBuffer.Size());
+ bufferForStringLikeValues->Advance(valueBuffer.Size());
auto value = TStringBuf(buffer, valueBuffer.Size());
@@ -822,7 +822,7 @@ void PrepareArray(
case ELogicalMetatype::Simple:
return PrepareArrayForSimpleLogicalType(
denullifiedLogicalType->AsSimpleTypeRef().GetElement(),
- bufferForStringLikeValues,
+ bufferForStringLikeValues,
column,
rowsValues,
columnIndex,
@@ -841,7 +841,7 @@ void PrepareArray(
case ELogicalMetatype::VariantStruct:
return PrepareArrayForComplexType(
denullifiedLogicalType,
- bufferForStringLikeValues,
+ bufferForStringLikeValues,
column,
rowsValues,
columnIndex,
@@ -895,7 +895,7 @@ public:
const auto denullifiedLogicalType = DenullifyLogicalType(columnType);
PrepareArray(
denullifiedLogicalType,
- bufferForStringLikeValues,
+ bufferForStringLikeValues,
batch->column(columnIndex),
rowsValues,
columnIndex,
diff --git a/yt/yt/library/formats/arrow_writer.cpp b/yt/yt/library/formats/arrow_writer.cpp
index 452254f738..e6598fb3cc 100644
--- a/yt/yt/library/formats/arrow_writer.cpp
+++ b/yt/yt/library/formats/arrow_writer.cpp
@@ -62,7 +62,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
switch (simpleType) {
case ESimpleLogicalValueType::Null:
case ESimpleLogicalValueType::Void:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Null,
org::apache::arrow::flatbuf::CreateNull(*flatbufBuilder)
.Union());
@@ -75,7 +75,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
case ESimpleLogicalValueType::Uint16:
case ESimpleLogicalValueType::Int32:
case ESimpleLogicalValueType::Uint32:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Int,
org::apache::arrow::flatbuf::CreateInt(
*flatbufBuilder,
@@ -84,7 +84,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
.Union());
case ESimpleLogicalValueType::Interval:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Int,
org::apache::arrow::flatbuf::CreateInt(
*flatbufBuilder,
@@ -93,7 +93,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
.Union());
case ESimpleLogicalValueType::Date:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Date,
org::apache::arrow::flatbuf::CreateDate(
*flatbufBuilder,
@@ -101,7 +101,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
.Union());
case ESimpleLogicalValueType::Datetime:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Date,
org::apache::arrow::flatbuf::CreateDate(
*flatbufBuilder,
@@ -109,7 +109,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
.Union());
case ESimpleLogicalValueType::Timestamp:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Timestamp,
org::apache::arrow::flatbuf::CreateTimestamp(
*flatbufBuilder,
@@ -117,7 +117,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
.Union());
case ESimpleLogicalValueType::Double:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_FloatingPoint,
org::apache::arrow::flatbuf::CreateFloatingPoint(
*flatbufBuilder,
@@ -125,7 +125,7 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
.Union());
case ESimpleLogicalValueType::Float:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_FloatingPoint,
org::apache::arrow::flatbuf::CreateFloatingPoint(
*flatbufBuilder,
@@ -133,20 +133,20 @@ std::tuple<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> Seriali
.Union());
case ESimpleLogicalValueType::Boolean:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Bool,
org::apache::arrow::flatbuf::CreateBool(*flatbufBuilder)
.Union());
case ESimpleLogicalValueType::String:
case ESimpleLogicalValueType::Any:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Binary,
org::apache::arrow::flatbuf::CreateBinary(*flatbufBuilder)
.Union());
case ESimpleLogicalValueType::Utf8:
- return std::make_tuple(
+ return std::tuple(
org::apache::arrow::flatbuf::Type_Utf8,
org::apache::arrow::flatbuf::CreateUtf8(*flatbufBuilder)
.Union());
@@ -823,7 +823,7 @@ void SerializeColumn(
if (IsIntegralType(simpleType)) {
SerializeIntegerColumn(typedColumn, simpleType, context);
} else if (simpleType == ESimpleLogicalValueType::Interval) {
- SerializeIntegerColumn(typedColumn, simpleType, context);
+ SerializeIntegerColumn(typedColumn, simpleType, context);
} else if (simpleType == ESimpleLogicalValueType::Date) {
SerializeDateColumn(typedColumn, context);
} else if (simpleType == ESimpleLogicalValueType::Datetime) {
@@ -872,7 +872,7 @@ auto SerializeRecordBatch(
auto totalSize = context->CurrentBodyOffset;
- return std::make_tuple(
+ return std::tuple(
recordBatchOffset,
totalSize,
[context = std::move(context)] (TMutableRef dstRef) {
diff --git a/yt/yt/library/formats/dsv_writer.cpp b/yt/yt/library/formats/dsv_writer.cpp
index 934b82ed26..e78d814602 100644
--- a/yt/yt/library/formats/dsv_writer.cpp
+++ b/yt/yt/library/formats/dsv_writer.cpp
@@ -37,11 +37,11 @@ public:
IAsyncOutputStreamPtr output,
TDsvFormatConfigPtr config = New<TDsvFormatConfig>())
: TSchemalessFormatWriterBase(
- nameTable,
- std::move(output),
- enableContextSaving,
- controlAttributesConfig,
- 0 /* keyColumnCount */)
+ nameTable,
+ std::move(output),
+ enableContextSaving,
+ controlAttributesConfig,
+ 0 /* keyColumnCount */)
, TDsvWriterBase(config)
{ }
diff --git a/yt/yt/library/formats/protobuf.cpp b/yt/yt/library/formats/protobuf.cpp
index b154817dcb..f50840cd70 100644
--- a/yt/yt/library/formats/protobuf.cpp
+++ b/yt/yt/library/formats/protobuf.cpp
@@ -987,10 +987,10 @@ void TProtobufFormatDescriptionBase<TType>::InitColumn(
parent->AddChild(
maybeDescriptor,
typeBuilder.CreateField(
- fieldIndex,
- columnConfig,
- maybeDescriptor,
- true),
+ fieldIndex,
+ columnConfig,
+ maybeDescriptor,
+ true),
fieldIndex,
parentEmbeddingIndex);
++fieldIndex;
diff --git a/yt/yt/library/formats/web_json_writer.cpp b/yt/yt/library/formats/web_json_writer.cpp
index a956486e67..582b2291a0 100644
--- a/yt/yt/library/formats/web_json_writer.cpp
+++ b/yt/yt/library/formats/web_json_writer.cpp
@@ -158,7 +158,7 @@ TStringBuf GetSimpleYqlTypeName(ESimpleLogicalValueType type)
void SerializeAsYqlType(TFluentAny fluent, const TLogicalTypePtr& type)
{
- auto serializeStruct = [] (TFluentList fluentList, const TStructLogicalTypeBase& structType) {
+ auto serializeStruct = [] (TFluentList fluentList, const TStructLogicalTypeBase& structType) {
fluentList
.Item().Value("StructType")
.Item().DoListFor(structType.GetFields(), [] (TFluentList innerFluentList, const TStructField& field) {
@@ -301,7 +301,7 @@ public:
Converters_.push_back(
CreateUnversionedValueToYqlConverter(column.LogicalType(), converterConfig, Consumer_));
auto [it, inserted] = TableIndexAndColumnNameToTypeIndex_.emplace(
- std::make_pair(tableIndex, column.Name()),
+ std::pair(tableIndex, column.Name()),
static_cast<int>(Types_.size()) - 1);
YT_VERIFY(inserted);
}
@@ -358,7 +358,7 @@ private:
if (typeIndex == UnschematizedTypeIndex) {
typeIndex = ValueTypeToTypeIndex_[valueType];
} else if (typeIndex == UnknownTypeIndex) {
- auto it = TableIndexAndColumnNameToTypeIndex_.find(std::make_pair(tableIndex, columnName));
+ auto it = TableIndexAndColumnNameToTypeIndex_.find(std::pair(tableIndex, columnName));
if (it == TableIndexAndColumnNameToTypeIndex_.end()) {
typeIndex = ValueTypeToTypeIndex_[valueType];
columnIdToTypeIndex[columnId] = UnschematizedTypeIndex;
diff --git a/yt/yt/library/formats/yamr_parser_base.cpp b/yt/yt/library/formats/yamr_parser_base.cpp
index 935faaed80..643d8738c8 100644
--- a/yt/yt/library/formats/yamr_parser_base.cpp
+++ b/yt/yt/library/formats/yamr_parser_base.cpp
@@ -113,7 +113,7 @@ void TYamrDelimitedBaseParser::ProcessTableSwitch(TStringBuf tableIndex)
YT_ASSERT(State == EState::InsideKey);
i64 value;
try {
- value = FromString<i64>(tableIndex);
+ value = FromString<i64>(tableIndex);
} catch (const std::exception& ex) {
TString tableIndexString(tableIndex);
if (tableIndex.size() > ContextBufferSize) {
diff --git a/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp b/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp
index 2fb87e4317..d1bb3458d5 100644
--- a/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp
+++ b/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp
@@ -1212,7 +1212,7 @@ TEST_F(TPiecewiseLinearFunctionTest, TestPiecewiseSegmentScalar)
EXPECT_TRUE(segment.IsDefinedAt(arg)) << testCaseMsg << ". " << sampleMsg;
EXPECT_EQ(expectedLeftLimit, segment.LeftLimitAt(arg)) << testCaseMsg << ". " << sampleMsg;
EXPECT_EQ(expectedRightLimit, segment.RightLimitAt(arg)) << testCaseMsg << ". " << sampleMsg;
- auto expectedLeftRightLimit = std::make_pair(expectedLeftLimit, expectedRightLimit);
+ auto expectedLeftRightLimit = std::pair(expectedLeftLimit, expectedRightLimit);
EXPECT_EQ(expectedLeftRightLimit, segment.LeftRightLimitAt(arg)) << testCaseMsg << ". " << sampleMsg;
EXPECT_EQ(expectedLeftLimit, segment.ValueAt(arg)) << testCaseMsg << ". " << sampleMsg;
}
diff --git a/yt/yt/library/process/unittests/pipes_ut.cpp b/yt/yt/library/process/unittests/pipes_ut.cpp
index 0c7e2a0cf2..1fb987f9e7 100644
--- a/yt/yt/library/process/unittests/pipes_ut.cpp
+++ b/yt/yt/library/process/unittests/pipes_ut.cpp
@@ -307,10 +307,10 @@ INSTANTIATE_TEST_SUITE_P(
ValueParametrized,
TPipeBigReadWriteTest,
::testing::Values(
- std::make_pair(2000 * 4096, 4096),
- std::make_pair(100 * 4096, 10000),
- std::make_pair(100 * 4096, 100),
- std::make_pair(100, 4096)));
+ std::pair(2000 * 4096, 4096),
+ std::pair(100 * 4096, 10000),
+ std::pair(100 * 4096, 100),
+ std::pair(100, 4096)));
#endif
diff --git a/yt/yt/library/profiling/resource_tracker/resource_tracker.cpp b/yt/yt/library/profiling/resource_tracker/resource_tracker.cpp
index 88f5c91a8a..0b814383ac 100644
--- a/yt/yt/library/profiling/resource_tracker/resource_tracker.cpp
+++ b/yt/yt/library/profiling/resource_tracker/resource_tracker.cpp
@@ -209,7 +209,7 @@ bool TResourceTracker::ProcessThread(TString tid, TResourceTracker::TThreadInfo*
auto tokens = SplitString(line, "\t");
if (tokens.size() < 2) {
- continue;
+ continue;
}
if (tokens[0] == "Name:") {
diff --git a/yt/yt/library/query/base/public.h b/yt/yt/library/query/base/public.h
new file mode 100644
index 0000000000..81e384a4af
--- /dev/null
+++ b/yt/yt/library/query/base/public.h
@@ -0,0 +1,153 @@
+#pragma once
+
+#include <yt/yt/client/query_client/public.h>
+
+#include <yt/yt/client/transaction_client/public.h>
+
+#include <yt/yt/client/table_client/public.h>
+
+#include <yt/yt/core/ypath/public.h>
+
+namespace NYT::NQueryClient {
+
+using NTransactionClient::TTimestamp;
+
+using NTableClient::TRowRange;
+
+using TReadSessionId = TGuid;
+
+struct TDataSplit;
+
+////////////////////////////////////////////////////////////////////////////////
+
+namespace NProto {
+
+class TColumnDescriptor;
+class TExpression;
+class TGroupClause;
+class TProjectClause;
+class TWhenThenExpression;
+class TJoinClause;
+class TQuery;
+class TQueryOptions;
+class TDataSource;
+
+} // namespace NProto
+
+////////////////////////////////////////////////////////////////////////////////
+
+DECLARE_REFCOUNTED_STRUCT(TExpression)
+using TConstExpressionPtr = TIntrusivePtr<const TExpression>;
+
+DECLARE_REFCOUNTED_STRUCT(TFunctionExpression)
+using TConstFunctionExpressionPtr = TIntrusivePtr<const TFunctionExpression>;
+
+DECLARE_REFCOUNTED_STRUCT(TAggregateFunctionExpression)
+using TConstAggregateFunctionExpressionPtr = TIntrusivePtr<const TAggregateFunctionExpression>;
+
+DECLARE_REFCOUNTED_STRUCT(TJoinClause)
+using TConstJoinClausePtr = TIntrusivePtr<const TJoinClause>;
+
+DECLARE_REFCOUNTED_STRUCT(TGroupClause)
+using TConstGroupClausePtr = TIntrusivePtr<const TGroupClause>;
+
+DECLARE_REFCOUNTED_STRUCT(TOrderClause)
+using TConstOrderClausePtr = TIntrusivePtr<const TOrderClause>;
+
+DECLARE_REFCOUNTED_STRUCT(TProjectClause)
+using TConstProjectClausePtr = TIntrusivePtr<const TProjectClause>;
+
+DECLARE_REFCOUNTED_STRUCT(TWhenThenExpression)
+using TConstWhenThenExpressionPtr = TIntrusivePtr<const TWhenThenExpression>;
+
+DECLARE_REFCOUNTED_STRUCT(TBaseQuery)
+using TConstBaseQueryPtr = TIntrusivePtr<const TBaseQuery>;
+
+DECLARE_REFCOUNTED_STRUCT(TFrontQuery)
+using TConstFrontQueryPtr = TIntrusivePtr<const TFrontQuery>;
+
+DECLARE_REFCOUNTED_STRUCT(TQuery)
+using TConstQueryPtr = TIntrusivePtr<const TQuery>;
+
+struct IPrepareCallbacks;
+
+struct TQueryStatistics;
+
+struct TQueryOptions;
+
+DECLARE_REFCOUNTED_STRUCT(IAggregateFunctionDescriptor)
+
+DECLARE_REFCOUNTED_STRUCT(ICallingConvention)
+
+DECLARE_REFCOUNTED_STRUCT(IExecutor)
+
+DECLARE_REFCOUNTED_STRUCT(IEvaluator)
+
+DECLARE_REFCOUNTED_CLASS(TExecutorConfig)
+
+DECLARE_REFCOUNTED_CLASS(TColumnEvaluator)
+
+DECLARE_REFCOUNTED_STRUCT(IColumnEvaluatorCache)
+
+DECLARE_REFCOUNTED_CLASS(TColumnEvaluatorCacheConfig)
+DECLARE_REFCOUNTED_CLASS(TColumnEvaluatorCacheDynamicConfig)
+
+DECLARE_REFCOUNTED_STRUCT(TExternalCGInfo)
+using TConstExternalCGInfoPtr = TIntrusivePtr<const TExternalCGInfo>;
+
+DECLARE_REFCOUNTED_STRUCT(TTypeInferrerMap)
+using TConstTypeInferrerMapPtr = TIntrusivePtr<const TTypeInferrerMap>;
+
+const TConstTypeInferrerMapPtr GetBuiltinTypeInferrers();
+
+DECLARE_REFCOUNTED_STRUCT(IFunctionRegistry)
+DECLARE_REFCOUNTED_CLASS(ITypeInferrer)
+
+DECLARE_REFCOUNTED_CLASS(TFunctionImplCache)
+
+using NTableClient::ISchemafulUnversionedReader;
+using NTableClient::ISchemafulUnversionedReaderPtr;
+using NTableClient::ISchemalessUnversionedReader;
+using NTableClient::ISchemalessUnversionedReaderPtr;
+using NTableClient::IUnversionedRowsetWriter;
+using NTableClient::IUnversionedRowsetWriterPtr;
+using NTableClient::EValueType;
+using NTableClient::TTableSchema;
+using NTableClient::TTableSchemaPtr;
+using NTableClient::TColumnSchema;
+using NTableClient::TKeyColumns;
+using NTableClient::TColumnFilter;
+using NTableClient::TRowRange;
+
+using NTransactionClient::TTimestamp;
+using NTransactionClient::NullTimestamp;
+
+using NTableClient::TRowBuffer;
+using NTableClient::TRowBufferPtr;
+
+using TSchemaColumns = std::vector<NTableClient::TColumnSchema>;
+
+using TRow = NTableClient::TUnversionedRow;
+using TMutableRow = NTableClient::TMutableUnversionedRow;
+using TRowHeader = NTableClient::TUnversionedRowHeader;
+using TRowBuilder = NTableClient::TUnversionedRowBuilder;
+using TOwningRow = NTableClient::TUnversionedOwningRow;
+using TOwningRowBuilder = NTableClient::TUnversionedOwningRowBuilder;
+using TValue = NTableClient::TUnversionedValue;
+using TValueData = NTableClient::TUnversionedValueData;
+using TOwningValue = NTableClient::TUnversionedOwningValue;
+using TLegacyOwningKey = NTableClient::TLegacyOwningKey;
+
+using TKeyRange = std::pair<TLegacyOwningKey, TLegacyOwningKey>;
+using TMutableRowRange = std::pair<TMutableRow, TMutableRow>;
+using TRowRanges = std::vector<TRowRange>;
+using TMutableRowRanges = std::vector<TMutableRowRange>;
+
+////////////////////////////////////////////////////////////////////////////////
+
+extern const NYPath::TYPath QueryPoolsPath;
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NQueryClient
+
diff --git a/yt/yt/library/skiff_ext/schema_match.cpp b/yt/yt/library/skiff_ext/schema_match.cpp
index 3caca87ff1..ae17c4a989 100644
--- a/yt/yt/library/skiff_ext/schema_match.cpp
+++ b/yt/yt/library/skiff_ext/schema_match.cpp
@@ -70,16 +70,16 @@ static bool IsSkiffSpecialColumn(
static std::pair<std::shared_ptr<TSkiffSchema>, bool> DeoptionalizeSchema(std::shared_ptr<TSkiffSchema> skiffSchema)
{
if (skiffSchema->GetWireType() != EWireType::Variant8) {
- return std::make_pair(skiffSchema, true);
+ return std::pair(skiffSchema, true);
}
auto children = skiffSchema->GetChildren();
if (children.size() != 2) {
- return std::make_pair(skiffSchema, true);
+ return std::pair(skiffSchema, true);
}
if (children[0]->GetWireType() == EWireType::Nothing) {
- return std::make_pair(children[1], false);
+ return std::pair(children[1], false);
} else {
- return std::make_pair(skiffSchema, true);
+ return std::pair(skiffSchema, true);
}
}
diff --git a/yt/yt/library/tracing/jaeger/tracer.cpp b/yt/yt/library/tracing/jaeger/tracer.cpp
index fd3a409f6d..43817c119f 100644
--- a/yt/yt/library/tracing/jaeger/tracer.cpp
+++ b/yt/yt/library/tracing/jaeger/tracer.cpp
@@ -289,7 +289,7 @@ std::tuple<std::vector<TSharedRef>, int, int> TBatchInfo::PeekQueue(const TJaege
batches.push_back(BatchQueue_[batchCount].second);
}
- return std::make_tuple(batches, batchCount, spanCount);
+ return std::tuple(batches, batchCount, spanCount);
}
TJaegerChannelManager::TJaegerChannelManager()