diff options
author | AlexSm <alex@ydb.tech> | 2024-01-11 14:49:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-11 14:49:03 +0100 |
commit | 2e180154bd6a38b90a128ba0463d0dd2706a5ccf (patch) | |
tree | 0e0890fa08e63af33c52c9b6eacee56d037a740b /yt | |
parent | 4366d88bef9360d9754e77eaa1f4a25d046a9cbd (diff) | |
download | ydb-2e180154bd6a38b90a128ba0463d0dd2706a5ccf.tar.gz |
Library import 7 (#937)
Diffstat (limited to 'yt')
87 files changed, 564 insertions, 436 deletions
diff --git a/yt/cpp/mapreduce/client/client.h b/yt/cpp/mapreduce/client/client.h index 9bed0d7287..5de00285ef 100644 --- a/yt/cpp/mapreduce/client/client.h +++ b/yt/cpp/mapreduce/client/client.h @@ -388,7 +388,7 @@ public: const TNode::TListType& keys, const TDeleteRowsOptions& options) override; - void TrimRows( + void TrimRows( const TYPath& path, i64 tabletIndex, i64 rowCount, diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp index 855e6e834c..ade0f339b7 100644 --- a/yt/cpp/mapreduce/client/operation.cpp +++ b/yt/cpp/mapreduce/client/operation.cpp @@ -364,9 +364,9 @@ TString GetJobStderrWithRetriesAndIgnoreErrors( options); } catch (const TErrorResponse& e) { YT_LOG_ERROR("Cannot get job stderr (OperationId: %v, JobId: %v, Error: %v)", - operationId, - jobId, - e.what()); + operationId, + jobId, + e.what()); } if (jobStderr.size() > stderrTailSize) { jobStderr = jobStderr.substr(jobStderr.size() - stderrTailSize, stderrTailSize); @@ -1605,12 +1605,12 @@ void ExecuteMapReduce( auto nodeReaderFormat = NodeReaderFormatFromHintAndGlobalConfig(spec.MapperFormatHints_); auto [inputFormat, inputFormatConfig] = formatBuilder.CreateFormat( - *mapper, - EIODirection::Input, - structuredInputs, - hints.InputFormatHints_, - nodeReaderFormat, - /* allowFormatFromTableAttribute */ true); + *mapper, + EIODirection::Input, + structuredInputs, + hints.InputFormatHints_, + nodeReaderFormat, + /* allowFormatFromTableAttribute */ true); auto [outputFormat, outputFormatConfig] = formatBuilder.CreateFormat( *mapper, diff --git a/yt/cpp/mapreduce/client/retry_heavy_write_request.h b/yt/cpp/mapreduce/client/retry_heavy_write_request.h index 853306ff42..052bbfb860 100644 --- a/yt/cpp/mapreduce/client/retry_heavy_write_request.h +++ b/yt/cpp/mapreduce/client/retry_heavy_write_request.h @@ -31,12 +31,12 @@ public: void Update(TStreamFactory streamFactory); void Finish(); - private: +private: void Retry(const std::function<void()>& function); void TryStartAttempt(); - private: +private: const TParameters Parameters_; const IRequestRetryPolicyPtr RequestRetryPolicy_; diff --git a/yt/cpp/mapreduce/client/retryful_writer.h b/yt/cpp/mapreduce/client/retryful_writer.h index 8c6de1c266..0b345daabf 100644 --- a/yt/cpp/mapreduce/client/retryful_writer.h +++ b/yt/cpp/mapreduce/client/retryful_writer.h @@ -77,7 +77,7 @@ public: size_t GetRetryBlockRemainingSize() const { - return (BufferSize_ > Buffer_.size()) ? (BufferSize_ - Buffer_.size()) : 0; + return (BufferSize_ > Buffer_.size()) ? (BufferSize_ - Buffer_.size()) : 0; } protected: diff --git a/yt/cpp/mapreduce/client/structured_table_formats.cpp b/yt/cpp/mapreduce/client/structured_table_formats.cpp index b0038f7386..6dba1e1435 100644 --- a/yt/cpp/mapreduce/client/structured_table_formats.cpp +++ b/yt/cpp/mapreduce/client/structured_table_formats.cpp @@ -431,7 +431,7 @@ std::pair<TFormat, TMaybe<TSmallJobFile>> TFormatBuilder::CreateNodeFormat( auto format = CreateSkiffFormat(skiffSchema); NYT::NDetail::ApplyFormatHints<TNode>(&format, formatHints); return { - CreateSkiffFormat(skiffSchema), + format, TSmallJobFile{ TString("skiff") + GetSuffix(direction), CreateSkiffConfig(skiffSchema) diff --git a/yt/cpp/mapreduce/interface/config.cpp b/yt/cpp/mapreduce/interface/config.cpp index e159780ba9..407c213226 100644 --- a/yt/cpp/mapreduce/interface/config.cpp +++ b/yt/cpp/mapreduce/interface/config.cpp @@ -68,7 +68,7 @@ EEncoding TConfig::GetEncoding(const char* var) } } - EUploadDeduplicationMode TConfig::GetUploadingDeduplicationMode( +EUploadDeduplicationMode TConfig::GetUploadingDeduplicationMode( const char* var, EUploadDeduplicationMode defaultValue) { diff --git a/yt/cpp/mapreduce/interface/fluent.h b/yt/cpp/mapreduce/interface/fluent.h index 8ca6e86336..a890b5a86b 100644 --- a/yt/cpp/mapreduce/interface/fluent.h +++ b/yt/cpp/mapreduce/interface/fluent.h @@ -373,7 +373,7 @@ public: return this->GetUnwrappedParent(); } - /// Open a map, call `func(*this, element)` for each `element` of range, then close the map. + /// Open a map, call `func(*this, element)` for each `element` of range, then close the map. template <class TFunc, class TIterator> TUnwrappedParent DoMapFor(const TIterator& begin, const TIterator& end, const TFunc& func) { diff --git a/yt/cpp/mapreduce/interface/job_statistics_ut.cpp b/yt/cpp/mapreduce/interface/job_statistics_ut.cpp index 0cf53d771a..2603a4fbf0 100644 --- a/yt/cpp/mapreduce/interface/job_statistics_ut.cpp +++ b/yt/cpp/mapreduce/interface/job_statistics_ut.cpp @@ -13,38 +13,38 @@ Y_UNIT_TEST_SUITE(JobStatistics) { const TString input = R"""( { - "data" = { - "output" = { - "0" = { - "uncompressed_data_size" = { - "$" = { - "completed" = { - "simple_sort" = { - "max" = 130; - "count" = 1; - "min" = 130; - "sum" = 130; - }; - "map" = { - "max" = 42; - "count" = 1; - "min" = 42; - "sum" = 42; - }; - }; - "aborted" = { - "simple_sort" = { - "max" = 24; - "count" = 1; - "min" = 24; - "sum" = 24; - }; - }; - }; - }; - }; - }; - }; + "data" = { + "output" = { + "0" = { + "uncompressed_data_size" = { + "$" = { + "completed" = { + "simple_sort" = { + "max" = 130; + "count" = 1; + "min" = 130; + "sum" = 130; + }; + "map" = { + "max" = 42; + "count" = 1; + "min" = 42; + "sum" = 42; + }; + }; + "aborted" = { + "simple_sort" = { + "max" = 24; + "count" = 1; + "min" = 24; + "sum" = 24; + }; + }; + }; + }; + }; + }; + }; })"""; TJobStatistics stat(NodeFromYsonString(input)); @@ -69,20 +69,20 @@ Y_UNIT_TEST_SUITE(JobStatistics) { const TString input = R"""( { - "time" = { - "exec" = { - "$" = { - "completed" = { - "map" = { - "max" = 2482468; - "count" = 38; - "min" = 578976; - "sum" = 47987270; - }; - }; - }; - }; - }; + "time" = { + "exec" = { + "$" = { + "completed" = { + "map" = { + "max" = 2482468; + "count" = 38; + "min" = 578976; + "sum" = 47987270; + }; + }; + }; + }; + }; })"""; TJobStatistics stat(NodeFromYsonString(input)); @@ -144,38 +144,38 @@ Y_UNIT_TEST_SUITE(JobStatistics) { const TString input = R"""( { - "data" = { - "output" = { - "0" = { - "uncompressed_data_size" = { - "$" = { - "completed" = { - "partition_map" = { - "max" = 130; - "count" = 1; - "min" = 130; - "sum" = 130; - }; - "partition(0)" = { - "max" = 42; - "count" = 1; - "min" = 42; - "sum" = 42; - }; - }; - "aborted" = { - "simple_sort" = { - "max" = 24; - "count" = 1; - "min" = 24; - "sum" = 24; - }; - }; - }; - }; - }; - }; - }; + "data" = { + "output" = { + "0" = { + "uncompressed_data_size" = { + "$" = { + "completed" = { + "partition_map" = { + "max" = 130; + "count" = 1; + "min" = 130; + "sum" = 130; + }; + "partition(0)" = { + "max" = 42; + "count" = 1; + "min" = 42; + "sum" = 42; + }; + }; + "aborted" = { + "simple_sort" = { + "max" = 24; + "count" = 1; + "min" = 24; + "sum" = 24; + }; + }; + }; + }; + }; + }; + }; })"""; TJobStatistics stat(NodeFromYsonString(input)); diff --git a/yt/cpp/mapreduce/interface/operation.h b/yt/cpp/mapreduce/interface/operation.h index 8ea26ae0d3..31252c2737 100644 --- a/yt/cpp/mapreduce/interface/operation.h +++ b/yt/cpp/mapreduce/interface/operation.h @@ -2219,7 +2219,7 @@ private: /// /// @see https://ytsaurus.tech/docs/en/user-guide/data-processing/operations/vanilla class IVanillaJobBase - : public virtual IStructuredJob + : public virtual IStructuredJob { public: /// Type of job implemented by this class. diff --git a/yt/cpp/mapreduce/interface/serialize.cpp b/yt/cpp/mapreduce/interface/serialize.cpp index 4ead9e9a7e..18cfaaa9b7 100644 --- a/yt/cpp/mapreduce/interface/serialize.cpp +++ b/yt/cpp/mapreduce/interface/serialize.cpp @@ -254,7 +254,7 @@ void Serialize(const TColumnSchema& columnSchema, NYson::IYsonConsumer* consumer }) .DoIf(columnSchema.StableName().Defined(), [&] (TFluentMap fluent) { fluent.Item("stable_name").Value(*columnSchema.StableName()); - }) + }) .DoIf(columnSchema.Deleted().Defined(), [&] (TFluentMap fluent) { fluent.Item("deleted").Value(*columnSchema.Deleted()); }) diff --git a/yt/cpp/mapreduce/interface/skiff_row.h b/yt/cpp/mapreduce/interface/skiff_row.h index 5dd335cb65..6bacfe2dde 100644 --- a/yt/cpp/mapreduce/interface/skiff_row.h +++ b/yt/cpp/mapreduce/interface/skiff_row.h @@ -101,17 +101,17 @@ public: template <typename T> class TSkiffRowSkipper : public ISkiffRowSkipper { public: - explicit TSkiffRowSkipper(const TMaybe<TSkiffRowHints>& hints) - : Parser_(CreateSkiffParser<T>(&Row_, hints)) - { } + explicit TSkiffRowSkipper(const TMaybe<TSkiffRowHints>& hints) + : Parser_(CreateSkiffParser<T>(&Row_, hints)) + { } - void SkipRow(NSkiff::TCheckedInDebugSkiffParser* parser) { - Parser_->Parse(parser); - } + void SkipRow(NSkiff::TCheckedInDebugSkiffParser* parser) { + Parser_->Parse(parser); + } private: - T Row_; - ISkiffRowParserPtr Parser_; + T Row_; + ISkiffRowParserPtr Parser_; }; //! Creates a skipper for row type 'T'. diff --git a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp index aa28382326..370ae35d8b 100644 --- a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp +++ b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp @@ -597,7 +597,7 @@ TNode SerializeParametersForInsertRows( result["durability"] = ToString(*options.Durability_); } if (options.RequireSyncReplica_) { - result["require_sync_replica"] = *options.RequireSyncReplica_; + result["require_sync_replica"] = *options.RequireSyncReplica_; } return result; } diff --git a/yt/yt/client/api/rpc_proxy/helpers.cpp b/yt/yt/client/api/rpc_proxy/helpers.cpp index a118284286..9562053d10 100644 --- a/yt/yt/client/api/rpc_proxy/helpers.cpp +++ b/yt/yt/client/api/rpc_proxy/helpers.cpp @@ -1651,6 +1651,16 @@ NJobTrackerClient::EJobState ConvertJobStateFromProto( //////////////////////////////////////////////////////////////////////////////// +bool IsDynamicTableRetriableError(const TError& error) +{ + // TODO(dgolear): Consider adding NoSuchTablet and TabletNotMounted errors? + return + error.FindMatching(NTabletClient::EErrorCode::RowIsBlocked) || + error.FindMatching(NTabletClient::EErrorCode::BlockedRowWaitTimeout) || + error.FindMatching(NTabletClient::EErrorCode::NoSuchCell) || + error.FindMatching(NTabletClient::EErrorCode::ChunkIsNotPreloaded); +} + bool IsRetriableError(const TError& error, bool retryProxyBanned) { if (error.FindMatching(NRpcProxy::EErrorCode::ProxyBanned) || @@ -1659,13 +1669,14 @@ bool IsRetriableError(const TError& error, bool retryProxyBanned) return retryProxyBanned; } - //! Retriable error codes are based on the ones used in http client. return + NRpc::IsRetriableError(error) || error.FindMatching(NRpc::EErrorCode::RequestQueueSizeLimitExceeded) || error.FindMatching(NRpc::EErrorCode::TransportError) || error.FindMatching(NRpc::EErrorCode::Unavailable) || error.FindMatching(NRpc::EErrorCode::TransientFailure) || - error.FindMatching(NSecurityClient::EErrorCode::RequestQueueSizeLimitExceeded); + error.FindMatching(NSecurityClient::EErrorCode::RequestQueueSizeLimitExceeded) || + IsDynamicTableRetriableError(error); } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/client/arrow/arrow_row_stream_encoder.cpp b/yt/yt/client/arrow/arrow_row_stream_encoder.cpp index e4de28086f..aaa81b7ef8 100644 --- a/yt/yt/client/arrow/arrow_row_stream_encoder.cpp +++ b/yt/yt/client/arrow/arrow_row_stream_encoder.cpp @@ -510,7 +510,7 @@ void SerializeStringLikeColumn( startIndex, endIndex, GetTypedValues<ui32>(dstRef)); - }); + }); context->AddBuffer( stringsSize, @@ -519,7 +519,7 @@ void SerializeStringLikeColumn( dstRef.Begin(), stringData.Begin() + startOffset, stringsSize); - }); + }); } void SerializeBooleanColumn( @@ -547,7 +547,7 @@ void SerializeBooleanColumn( column->StartIndex, column->StartIndex + column->ValueCount, dstRef); - }); + }); } void SerializeNullColumn( diff --git a/yt/yt/client/chaos_client/replication_card.cpp b/yt/yt/client/chaos_client/replication_card.cpp index 1b57792136..a32919b525 100644 --- a/yt/yt/client/chaos_client/replication_card.cpp +++ b/yt/yt/client/chaos_client/replication_card.cpp @@ -33,7 +33,7 @@ void FormatProgressWithProjection( segments.end(), replicationProgressProjection.From, [] (const auto& lhs, const auto& rhs) { - return CompareRows(lhs, rhs.LowerKey) <= 0; + return CompareRows(lhs, rhs.LowerKey) <= 0; }); bool comma = false; @@ -61,7 +61,6 @@ void FormatProgressWithProjection( } // namespace NDetail - //////////////////////////////////////////////////////////////////////////////// TReplicationCardFetchOptions::operator size_t() const diff --git a/yt/yt/client/chaos_client/replication_card_serialization.cpp b/yt/yt/client/chaos_client/replication_card_serialization.cpp index cb2ca23516..159aa547d3 100644 --- a/yt/yt/client/chaos_client/replication_card_serialization.cpp +++ b/yt/yt/client/chaos_client/replication_card_serialization.cpp @@ -226,7 +226,7 @@ void Serialize(const TReplicationProgress& replicationProgress, IYsonConsumer* c .Item("lower_key").Value(segment.LowerKey ? segment.LowerKey : EmptyKey()) .Item("timestamp").Value(segment.Timestamp) .EndMap(); - }) + }) .Item("upper_key").Value(replicationProgress.UpperKey ? replicationProgress.UpperKey : EmptyKey()) .EndMap(); } diff --git a/yt/yt/client/driver/chaos_commands.cpp b/yt/yt/client/driver/chaos_commands.cpp index e5f80505be..4012dadedb 100644 --- a/yt/yt/client/driver/chaos_commands.cpp +++ b/yt/yt/client/driver/chaos_commands.cpp @@ -60,7 +60,7 @@ void TAlterReplicationCardCommand::Register(TRegistrar registrar) .Optional(/*init*/ false); registrar.ParameterWithUniversalAccessor<std::optional<TReplicationCardCollocationId>>( "replication_card_collocation_id", - [] (TThis* command) -> auto& { + [] (TThis* command) -> auto& { return command->Options.ReplicationCardCollocationId; }) .Optional(/*init*/ false); diff --git a/yt/yt/client/driver/cypress_commands.h b/yt/yt/client/driver/cypress_commands.h index 69198eaea8..3a4b14bc9d 100644 --- a/yt/yt/client/driver/cypress_commands.h +++ b/yt/yt/client/driver/cypress_commands.h @@ -93,7 +93,7 @@ private: //////////////////////////////////////////////////////////////////////////////// class TCreateCommand - : public NYTree::TYsonStructLite + : public NYTree::TYsonStructLite { public: void Execute(ICommandContextPtr context); diff --git a/yt/yt/client/driver/table_commands.cpp b/yt/yt/client/driver/table_commands.cpp index c4ba308c67..de88444a06 100644 --- a/yt/yt/client/driver/table_commands.cpp +++ b/yt/yt/client/driver/table_commands.cpp @@ -441,7 +441,7 @@ void TPartitionTablesCommand::DoExecute(ICommandContextPtr context) Options.AdjustDataWeightPerPartition = AdjustDataWeightPerPartition; auto partitions = WaitFor(context->GetClient()->PartitionTables(Paths, Options)) - .ValueOrThrow(); + .ValueOrThrow(); context->ProduceOutputValue(ConvertToYsonString(partitions)); } diff --git a/yt/yt/client/federated/unittests/client_ut.cpp b/yt/yt/client/federated/unittests/client_ut.cpp index 4268404dd0..cedef2e3c5 100644 --- a/yt/yt/client/federated/unittests/client_ut.cpp +++ b/yt/yt/client/federated/unittests/client_ut.cpp @@ -239,7 +239,7 @@ TEST(TFederatedClientTest, CheckHealth) // Wait for the next check of cluster liveness, `vla` cluster will become current again. Sleep(TDuration::Seconds(5)); - // From `vla` because it became ok again. + // From `vla` because it became ok again. { auto result = federatedClient->LookupRows(data.Path, data.NameTable, data.Keys); auto rows = result.Get().Value().Rowset->GetRows(); diff --git a/yt/yt/client/hedging/hedging.cpp b/yt/yt/client/hedging/hedging.cpp index 349545115e..92118420d8 100644 --- a/yt/yt/client/hedging/hedging.cpp +++ b/yt/yt/client/hedging/hedging.cpp @@ -225,8 +225,9 @@ NApi::IClientPtr CreateHedgingClient(const THedgingClientOptions& options) return New<THedgingClient>(options, CreateDummyPenaltyProvider()); } -NApi::IClientPtr CreateHedgingClient(const THedgingClientOptions& options, - const IPenaltyProviderPtr& penaltyProvider) +NApi::IClientPtr CreateHedgingClient( + const THedgingClientOptions& options, + const IPenaltyProviderPtr& penaltyProvider) { return New<THedgingClient>(options, penaltyProvider); } @@ -241,9 +242,10 @@ NApi::IClientPtr CreateHedgingClient(const THedgingClientConfig& config, const I return CreateHedgingClient(GetHedgingClientOptions(config, clientsCache)); } -NApi::IClientPtr CreateHedgingClient(const THedgingClientConfig& config, - const IClientsCachePtr& clientsCache, - const IPenaltyProviderPtr& penaltyProvider) +NApi::IClientPtr CreateHedgingClient( + const THedgingClientConfig& config, + const IClientsCachePtr& clientsCache, + const IPenaltyProviderPtr& penaltyProvider) { return CreateHedgingClient(GetHedgingClientOptions(config, clientsCache), penaltyProvider); } diff --git a/yt/yt/client/hedging/unittests/counters_ut.cpp b/yt/yt/client/hedging/unittests/counters_ut.cpp index e6dc5eeb48..667cc0813b 100644 --- a/yt/yt/client/hedging/unittests/counters_ut.cpp +++ b/yt/yt/client/hedging/unittests/counters_ut.cpp @@ -37,9 +37,10 @@ const auto SleepQuantum = TDuration::MilliSeconds(100); #define EXPECT_DURATION_NEAR(a, b) EXPECT_NEAR(a.MilliSeconds(), b.MilliSeconds(), 1) -NApi::IClientPtr CreateTestHedgingClient(std::initializer_list<NApi::IClientPtr> clients, - std::initializer_list<TCounterPtr> counters, - TDuration banDuration = SleepQuantum * 5) +NApi::IClientPtr CreateTestHedgingClient( + std::initializer_list<NApi::IClientPtr> clients, + std::initializer_list<TCounterPtr> counters, + TDuration banDuration = SleepQuantum * 5) { THedgingClientOptions options; options.BanPenalty = SleepQuantum * 2; @@ -77,8 +78,9 @@ TEST(THedgingClientCountersTest, CountersAfterSuccessFromFirstClient) auto firstClientCounter = New<TCounter>(registry.WithTag("c", "first")); auto secondClientCounter = New<TCounter>(registry.WithTag("c", "first")); - auto client = CreateTestHedgingClient({firstMockClient, secondMockClient}, - {firstClientCounter, secondClientCounter}); + auto client = CreateTestHedgingClient( + {firstMockClient, secondMockClient}, + {firstClientCounter, secondClientCounter}); auto queryResult = NConcurrency::WaitFor(client->ListNode(path, options)); // Wait for cancelled request finish. @@ -120,9 +122,10 @@ TEST(THedgingClientCountersTest, CountersAfterFirstClientHasFailed) auto firstClientCounter = New<TCounter>(registry.WithTag("c", "first")); auto secondClientCounter = New<TCounter>(registry.WithTag("c", "second")); - auto client = CreateTestHedgingClient({firstMockClient, secondMockClient}, - {firstClientCounter, secondClientCounter}, - TDuration::Seconds(5)); + auto client = CreateTestHedgingClient( + {firstMockClient, secondMockClient}, + {firstClientCounter, secondClientCounter}, + TDuration::Seconds(5)); auto queryResult = NConcurrency::WaitFor(client->ListNode(path, options)); // Error result from first client with effective initial penalty equals to 0 ms @@ -163,8 +166,9 @@ TEST(THedgingClientCountersTest, CountersWhenFirstClientIsBanned) auto firstClientCounter = New<TCounter>(registry.WithTag("c", "first")); auto secondClientCounter = New<TCounter>(registry.WithTag("c", "second")); - auto client = CreateTestHedgingClient({firstMockClient, secondMockClient}, - {firstClientCounter, secondClientCounter}); + auto client = CreateTestHedgingClient( + {firstMockClient, secondMockClient}, + {firstClientCounter, secondClientCounter}); auto firstQueryResult = NConcurrency::WaitFor(client->ListNode(path, options)); auto secondQueryResult = NConcurrency::WaitFor(client->ListNode(path, options)); @@ -212,9 +216,10 @@ TEST(THedgingClientCountersTest, CountersAfterFirstClientBanHasElapsed) auto banDuration = SleepQuantum * 2; - auto client = CreateTestHedgingClient({firstMockClient, secondMockClient}, - {firstClientCounter, secondClientCounter}, - banDuration); + auto client = CreateTestHedgingClient( + {firstMockClient, secondMockClient}, + {firstClientCounter, secondClientCounter}, + banDuration); auto firstQueryResult = NConcurrency::WaitFor(client->ListNode(path, options)); Sleep(banDuration); diff --git a/yt/yt/client/table_client/helpers.cpp b/yt/yt/client/table_client/helpers.cpp index 60767d1a68..9e33a43949 100644 --- a/yt/yt/client/table_client/helpers.cpp +++ b/yt/yt/client/table_client/helpers.cpp @@ -858,8 +858,8 @@ void UnversionedValueToListImpl( std::function<google::protobuf::Message*()> appender, const TProtobufMessageType* type) : Appender_(std::move(appender)) - , Type_(type) - , OutputStream_(&WireBytes_) + , Type_(type) + , OutputStream_(&WireBytes_) { } void OnStringScalar(TStringBuf value) override diff --git a/yt/yt/client/table_client/unittests/helpers/helpers.cpp b/yt/yt/client/table_client/unittests/helpers/helpers.cpp index c0b611f6a2..6f9754aa28 100644 --- a/yt/yt/client/table_client/unittests/helpers/helpers.cpp +++ b/yt/yt/client/table_client/unittests/helpers/helpers.cpp @@ -136,7 +136,7 @@ void CheckResult(std::vector<TVersionedRow> expected, IVersionedReaderPtr reader std::vector<TVersionedRow> actual; actual.reserve(100); - while (auto batch = reader->Read({.MaxRowsPerRead = 100})) { + while (auto batch = reader->Read({.MaxRowsPerRead = 20})) { if (batch->IsEmpty()) { ASSERT_TRUE(reader->GetReadyEvent().Get().IsOK()); continue; diff --git a/yt/yt/client/table_client/unversioned_row.cpp b/yt/yt/client/table_client/unversioned_row.cpp index cff031f054..296f9c7355 100644 --- a/yt/yt/client/table_client/unversioned_row.cpp +++ b/yt/yt/client/table_client/unversioned_row.cpp @@ -1314,7 +1314,7 @@ void ValidateReadTimestamp(TTimestamp timestamp) void ValidateGetInSyncReplicasTimestamp(TTimestamp timestamp) { if (timestamp != SyncLastCommittedTimestamp && - (timestamp < MinTimestamp || timestamp > MaxTimestamp)) + (timestamp < MinTimestamp || timestamp > MaxTimestamp)) { THROW_ERROR_EXCEPTION("Invalid GetInSyncReplicas timestamp %x", timestamp); } diff --git a/yt/yt/client/table_client/versioned_row.cpp b/yt/yt/client/table_client/versioned_row.cpp index 17fd1e41ba..e06544fac2 100644 --- a/yt/yt/client/table_client/versioned_row.cpp +++ b/yt/yt/client/table_client/versioned_row.cpp @@ -559,7 +559,7 @@ bool TBitwiseVersionedRowEqual::operator()(TVersionedRow lhs, TVersionedRow rhs) } for (int index = 0; index < lhs.GetKeyCount(); ++index) { - if (!TBitwiseUnversionedValueEqual()(lhs.Keys()[index], lhs.Keys()[index])) { + if (!TBitwiseUnversionedValueEqual()(lhs.Keys()[index], rhs.Keys()[index])) { return false; } } diff --git a/yt/yt/client/unittests/zookeeper_bus_ut.cpp b/yt/yt/client/unittests/zookeeper_bus_ut.cpp index 559f503037..de29ed481b 100644 --- a/yt/yt/client/unittests/zookeeper_bus_ut.cpp +++ b/yt/yt/client/unittests/zookeeper_bus_ut.cpp @@ -57,7 +57,7 @@ public: { EXPECT_EQ(1, std::ssize(message)); auto replyMessage = Serialize(Message_); - replyBus->Send(replyMessage, NBus::TSendOptions(EDeliveryTrackingLevel::None)); + YT_UNUSED_FUTURE(replyBus->Send(replyMessage, NBus::TSendOptions(EDeliveryTrackingLevel::None))); } private: diff --git a/yt/yt/client/ypath/rich.cpp b/yt/yt/client/ypath/rich.cpp index ac68331821..700fbd69bc 100644 --- a/yt/yt/client/ypath/rich.cpp +++ b/yt/yt/client/ypath/rich.cpp @@ -22,6 +22,41 @@ using namespace NChunkClient; using namespace NTableClient; using namespace NSecurityClient; +static const std::vector<TString> WellKnownAttributes = { + "append", + "teleport", + "primary", + "foreign", + "columns", + "rename_columns", + "ranges", + "file_name", + "executable", + "format", + "schema", + "sorted_by", + "row_count_limit", + "timestamp", + "retention_timestamp", + "output_timestamp", + "optimize_for", + "chunk_format", + "compression_codec", + "erasure_codec", + "auto_merge", + "transaction_id", + "security_tags", + "bypass_artifact_cache", + "schema_modification", + "partially_sorted", + "chunk_unique_keys", + "copy_file", + "chunk_sort_columns", + "cluster", + "clusters", + "create", +}; + //////////////////////////////////////////////////////////////////////////////// TRichYPath::TRichYPath() @@ -733,6 +768,11 @@ void FromProto(TRichYPath* path, const TString& protoPath) //////////////////////////////////////////////////////////////////////////////// +const std::vector<TString>& GetWellKnownRichYPathAttributes() +{ + return WellKnownAttributes; +} + } // namespace NYT::NYPath size_t THash<NYT::NYPath::TRichYPath>::operator()(const NYT::NYPath::TRichYPath& richYPath) const diff --git a/yt/yt/client/ypath/rich.h b/yt/yt/client/ypath/rich.h index 142c87ad26..fa53d6a568 100644 --- a/yt/yt/client/ypath/rich.h +++ b/yt/yt/client/ypath/rich.h @@ -185,6 +185,10 @@ void FromProto(TRichYPath* path, const TString& protoPath); //////////////////////////////////////////////////////////////////////////////// +const std::vector<TString>& GetWellKnownRichYPathAttributes(); + +//////////////////////////////////////////////////////////////////////////////// + } // namespace NYT::NYPath template <> diff --git a/yt/yt/core/actions/future.h b/yt/yt/core/actions/future.h index fc993062c8..aa31d8e690 100644 --- a/yt/yt/core/actions/future.h +++ b/yt/yt/core/actions/future.h @@ -332,7 +332,7 @@ protected: //////////////////////////////////////////////////////////////////////////////// template <class T> -class TFuture +class [[nodiscard]] TFuture : public TFutureBase<T> { public: @@ -376,7 +376,7 @@ private: //////////////////////////////////////////////////////////////////////////////// template <> -class TFuture<void> +class [[nodiscard]] TFuture<void> : public TFutureBase<void> { public: diff --git a/yt/yt/core/bus/tcp/config.h b/yt/yt/core/bus/tcp/config.h index 40322c3ae7..54020c6b08 100644 --- a/yt/yt/core/bus/tcp/config.h +++ b/yt/yt/core/bus/tcp/config.h @@ -68,7 +68,7 @@ public: std::optional<TEnumIndexedVector<EMultiplexingBand, TMultiplexingBandConfigPtr>> MultiplexingBands; - //! Used to store TLS/SSL certificate files. + //! Used to store TLS/SSL certificate files. std::optional<TString> BusCertsDirectoryPath; REGISTER_YSON_STRUCT(TTcpDispatcherDynamicConfig); diff --git a/yt/yt/core/bus/unittests/bus_ut.cpp b/yt/yt/core/bus/unittests/bus_ut.cpp index 1bf05df99c..ac3cf0bbdb 100644 --- a/yt/yt/core/bus/unittests/bus_ut.cpp +++ b/yt/yt/core/bus/unittests/bus_ut.cpp @@ -88,7 +88,7 @@ public: { EXPECT_EQ(NumPartsExpecting, std::ssize(message)); auto replyMessage = Serialize("42"); - replyBus->Send(replyMessage, NBus::TSendOptions(EDeliveryTrackingLevel::None)); + YT_UNUSED_FUTURE(replyBus->Send(replyMessage, NBus::TSendOptions(EDeliveryTrackingLevel::None))); } private: int NumPartsExpecting; diff --git a/yt/yt/core/concurrency/unittests/scheduler_ut.cpp b/yt/yt/core/concurrency/unittests/scheduler_ut.cpp index a36173babf..3e032a82d7 100644 --- a/yt/yt/core/concurrency/unittests/scheduler_ut.cpp +++ b/yt/yt/core/concurrency/unittests/scheduler_ut.cpp @@ -621,10 +621,10 @@ TEST_F(TSchedulerTest, TestWaitUntilSet) auto p1 = NewPromise<void>(); auto f1 = p1.ToFuture(); - BIND([=] () { + YT_UNUSED_FUTURE(BIND([=] () { Sleep(SleepQuantum); p1.Set(); - }).AsyncVia(Queue1->GetInvoker()).Run(); + }).AsyncVia(Queue1->GetInvoker()).Run()); WaitUntilSet(f1); EXPECT_TRUE(f1.IsSet()); @@ -737,25 +737,25 @@ TEST_F(TSchedulerTest, CancelInApply) BIND([=] () { auto promise = NewPromise<void>(); - promise.ToFuture().Apply(BIND([] { + YT_UNUSED_FUTURE(promise.ToFuture().Apply(BIND([] { auto canceler = NYT::NConcurrency::GetCurrentFiberCanceler(); canceler(TError("kek")); auto p = NewPromise<void>(); WaitFor(p.ToFuture()) .ThrowOnError(); - })); + }))); promise.Set(); - promise.ToFuture().Apply(BIND([] { + YT_UNUSED_FUTURE(promise.ToFuture().Apply(BIND([] { auto canceler = NYT::NConcurrency::GetCurrentFiberCanceler(); canceler(TError("kek")); auto p = NewPromise<void>(); WaitFor(p.ToFuture()) .ThrowOnError(); - })); + }))); }) .AsyncVia(invoker) .Run() @@ -1106,12 +1106,12 @@ TEST_W(TSchedulerTest, FutureUpdatedRaceInWaitFor_YT_18899) auto promise = NewPromise<void>(); auto modifiedFuture = promise.ToFuture(); - modifiedFuture.Apply( + YT_UNUSED_FUTURE(modifiedFuture.Apply( BIND([&] { modifiedFuture = MakeFuture(TError{"error that should not be seen"}); }) .AsyncVia(serializedInvoker) - ); + )); NThreading::TCountDownLatch latch{1}; @@ -1128,14 +1128,14 @@ TEST_W(TSchedulerTest, FutureUpdatedRaceInWaitFor_YT_18899) // Wait until serialized executor starts executing action. latch.Wait(); - BIND([&] { + YT_UNUSED_FUTURE(BIND([&] { // N.B. waiting action is inside WairFor now, because: // - we know that waiting action had started execution before this action was scheduled // - this action is executed inside the same serialized invoker. promise.Set(); }) .AsyncVia(serializedInvoker) - .Run(); + .Run()); ASSERT_NO_THROW(testResultFuture .Get() diff --git a/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp b/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp index d75f245903..8f8f283f90 100644 --- a/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp +++ b/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp @@ -410,7 +410,7 @@ TEST_F(TPrefetchingThrottlerExponentialGrowthTest, DoNotHangUpAfterAnError) requests[0].Set(TError(NYT::EErrorCode::Generic, "Test error")); EXPECT_FALSE(failedRequest.Get().IsOK()); - Throttler_->Throttle(1); + YT_UNUSED_FUTURE(Throttler_->Throttle(1)); } TEST_F(TPrefetchingThrottlerExponentialGrowthTest, Release) diff --git a/yt/yt/core/http/connection_pool.cpp b/yt/yt/core/http/connection_pool.cpp index b49afe57ec..9cb971b8ab 100644 --- a/yt/yt/core/http/connection_pool.cpp +++ b/yt/yt/core/http/connection_pool.cpp @@ -31,7 +31,7 @@ TConnectionPool::TConnectionPool( , Config_(std::move(config)) , Connections_(Config_->MaxIdleConnections) , ExpiredConnectionsCollector_( - New<TPeriodicExecutor>( + New<TPeriodicExecutor>( std::move(invoker), BIND([weakThis = MakeWeak(this)] { auto this_ = weakThis.Lock(); diff --git a/yt/yt/core/http/unittests/http_ut.cpp b/yt/yt/core/http/unittests/http_ut.cpp index bb2c4e458e..e8fcb86c06 100644 --- a/yt/yt/core/http/unittests/http_ut.cpp +++ b/yt/yt/core/http/unittests/http_ut.cpp @@ -1305,7 +1305,7 @@ TEST_P(THttpServerTest, ConnectionsDropRoutine) Sleep(TDuration::MilliSeconds(220)); EXPECT_CALL(*dialerMock, Dial).WillOnce(testing::Return(MakeFuture<IConnectionPtr>(nullptr))); - pool->Connect(address); + YT_UNUSED_FUTURE(pool->Connect(address)); } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/misc/error-inl.h b/yt/yt/core/misc/error-inl.h index 486216be91..cdc4cdedfa 100644 --- a/yt/yt/core/misc/error-inl.h +++ b/yt/yt/core/misc/error-inl.h @@ -19,7 +19,7 @@ inline constexpr TErrorCode::TErrorCode(int value) { } template <class E> -requires std::is_enum_v<E> + requires std::is_enum_v<E> constexpr TErrorCode::TErrorCode(E value) : Value_(static_cast<int>(value)) { } @@ -30,22 +30,22 @@ inline constexpr TErrorCode::operator int() const } template <class E> -requires std::is_enum_v<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) + requires std::is_enum_v<E> +constexpr bool TErrorCode::operator == (E rhs) const { - return static_cast<int>(lhs) == static_cast<int>(rhs); + return Value_ == static_cast<int>(rhs); } -constexpr inline bool operator == (TErrorCode lhs, TErrorCode rhs) +constexpr bool TErrorCode::operator == (TErrorCode rhs) const { - return static_cast<int>(lhs) == static_cast<int>(rhs); + return Value_ == static_cast<int>(rhs); } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/misc/error.h b/yt/yt/core/misc/error.h index fb30619a5a..5fda6888f3 100644 --- a/yt/yt/core/misc/error.h +++ b/yt/yt/core/misc/error.h @@ -36,18 +36,23 @@ public: constexpr TErrorCode(); explicit constexpr TErrorCode(int value); template <class E> - requires std::is_enum_v<E> + requires std::is_enum_v<E> constexpr TErrorCode(E value); constexpr operator int() const; template <class E> - requires std::is_enum_v<E> + requires std::is_enum_v<E> constexpr operator E() const; void Save(TStreamSaveContext& context) const; void Load(TStreamLoadContext& context); + template <class E> + requires std::is_enum_v<E> + constexpr bool operator == (E rhs) const; + + constexpr bool operator == (TErrorCode rhs) const; private: int Value_; }; @@ -55,12 +60,6 @@ private: void FormatValue(TStringBuilderBase* builder, TErrorCode code, TStringBuf spec); TString ToString(TErrorCode code); -template <class E> -requires std::is_enum_v<E> -constexpr bool operator == (TErrorCode lhs, E rhs); - -constexpr bool operator == (TErrorCode lhs, TErrorCode rhs); - //////////////////////////////////////////////////////////////////////////////// constexpr int ErrorSerializationDepthLimit = 16; diff --git a/yt/yt/core/misc/persistent_queue-inl.h b/yt/yt/core/misc/persistent_queue-inl.h index 5f277db695..f122be2d94 100644 --- a/yt/yt/core/misc/persistent_queue-inl.h +++ b/yt/yt/core/misc/persistent_queue-inl.h @@ -60,7 +60,7 @@ TPersistentQueueIterator<T, ChunkSize>::TPersistentQueueIterator( TChunkPtr chunk, size_t index) : CurrentChunk_(std::move(chunk)) - , CurrentIndex_(index) + , CurrentIndex_(index) { } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/misc/proc.cpp b/yt/yt/core/misc/proc.cpp index 2fbd8ba1d6..8cc18d0933 100644 --- a/yt/yt/core/misc/proc.cpp +++ b/yt/yt/core/misc/proc.cpp @@ -759,14 +759,14 @@ void SetUid(int uid) #ifdef _linux_ const auto* passwd = getpwuid(uid); int gid = (passwd && errno == 0) - ? passwd->pw_gid - : uid; // fallback value. + ? passwd->pw_gid + : uid; // fallback value. if (setresgid(gid, gid, gid) != 0) { THROW_ERROR_EXCEPTION("Unable to set gids") - << TErrorAttribute("uid", uid) - << TErrorAttribute("gid", gid) - << TError::FromSystem(); + << TErrorAttribute("uid", uid) + << TErrorAttribute("gid", gid) + << TError::FromSystem(); } if (setresuid(uid, uid, uid) != 0) { diff --git a/yt/yt/core/misc/statistics-inl.h b/yt/yt/core/misc/statistics-inl.h index d02287d943..588d0a05c1 100644 --- a/yt/yt/core/misc/statistics-inl.h +++ b/yt/yt/core/misc/statistics-inl.h @@ -155,7 +155,7 @@ void SerializeYsonPathsMap( // previous one in order to close necessary number of maps. commonDepth = SkipEqualTokens(currentTokenizer, previousTokenizer); - // Close all redundant maps. + // Close all redundant maps. while (previousDepth > commonDepth) { consumer->OnEndMap(); --previousDepth; diff --git a/yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp b/yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp index 053f75ab2a..add613a508 100644 --- a/yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp +++ b/yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp @@ -95,7 +95,7 @@ TEST(TAsyncExpiringCacheTest, TestBackgroundUpdate) auto cache = New<TSimpleExpiringCache>(config); auto start = Now(); - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(500)); int actual = cache->GetCount(); auto end = Now(); @@ -118,7 +118,7 @@ TEST(TAsyncExpiringCacheTest, TestConcurrentAccess) for (int i = 0; i < 10; ++i) { auto callback = BIND([=] () { for (int j = 0; j < 1000; ++j) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); if (rand() % 20 == 0) { cache->InvalidateActive(0); @@ -198,7 +198,7 @@ TEST(TAsyncExpiringCacheTest, TestAccessTime2) auto cache = New<TSimpleExpiringCache>(config); for (int i = 0; i < 10; ++i) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(50)); } @@ -213,7 +213,7 @@ TEST(TAsyncExpiringCacheTest, TestAccessTime3) auto cache = New<TSimpleExpiringCache>(config); for (int i = 0; i < 10; ++i) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(100)); } @@ -240,7 +240,7 @@ TEST(TAsyncExpiringCacheTest, TestUpdateTime1) auto cache = New<TSimpleExpiringCache>(config, 1.0); for (int i = 0; i < 10; ++i) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(100)); } @@ -254,7 +254,7 @@ TEST(TAsyncExpiringCacheTest, TestUpdateTime2) auto cache = New<TSimpleExpiringCache>(config, 0.0); for (int i = 0; i < 10; ++i) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(100)); } 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 0a48a2c68e..7e2393f30a 100644 --- a/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp +++ b/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp @@ -695,7 +695,7 @@ TEST(TAsyncSlruGhostCacheTest, Lookups) auto oldLargeCounters = cache->ReadLargeGhostCounters(); for (int index = 0; index < 6; ++index) { - cache->Lookup(index); + YT_UNUSED_FUTURE(cache->Lookup(index)); } auto smallCount = cache->ReadSmallGhostCounters() - oldSmallCounters; @@ -736,7 +736,7 @@ TEST(TAsyncSlruGhostCacheTest, MoveConstructCookie) auto oldLargeCounters = cache->ReadLargeGhostCounters(); for (int index = 0; index < 5; ++index) { - cache->Lookup(index); + YT_UNUSED_FUTURE(cache->Lookup(index)); } auto smallCount = cache->ReadSmallGhostCounters() - oldSmallCounters; @@ -799,7 +799,7 @@ TEST(TAsyncSlruGhostCacheTest, MoveAssignCookie) auto oldLargeCounters = cache->ReadLargeGhostCounters(); for (int index = 0; index < 5; ++index) { - cache->Lookup(index); + YT_UNUSED_FUTURE(cache->Lookup(index)); } auto smallCount = cache->ReadSmallGhostCounters() - oldSmallCounters; diff --git a/yt/yt/core/misc/unittests/enum_ut.cpp b/yt/yt/core/misc/unittests/enum_ut.cpp index 44d55436f9..95d10ec58a 100644 --- a/yt/yt/core/misc/unittests/enum_ut.cpp +++ b/yt/yt/core/misc/unittests/enum_ut.cpp @@ -13,8 +13,8 @@ DEFINE_ENUM(EColor, ((Red) (10)) ((Green)(20)) ((Blue) (30)) - (Black) - (White) + (Black) + (White) ); TEST(TEnumTest, SaveAndLoad) diff --git a/yt/yt/core/misc/unittests/error_code_ut.cpp b/yt/yt/core/misc/unittests/error_code_ut.cpp index 4670966cd1..0fddbbee79 100644 --- a/yt/yt/core/misc/unittests/error_code_ut.cpp +++ b/yt/yt/core/misc/unittests/error_code_ut.cpp @@ -1,5 +1,6 @@ #include <yt/yt/core/test_framework/framework.h> +#include <yt/yt/core/misc/error.h> #include <yt/yt/core/misc/error_code.h> #include <library/cpp/yt/string/format.h> @@ -114,6 +115,30 @@ TEST(TErrorCodeRegistryTest, Basic) (TErrorCodeRegistry::TErrorCodeInfo{"NUnknown", "ErrorCode-111"})); } +DEFINE_ENUM(ETestEnumOne, + ((VariantOne) (0)) + ((VariantTwo) (1)) +); + +DEFINE_ENUM(ETestEnumTwo, + ((DifferentVariantOne) (0)) + ((DifferentVariantTwo) (1)) +); + +template <class T, class K> +concept EquallyComparable = requires(T a, K b) +{ + { static_cast<T>(0) == static_cast<K>(0) }; +}; + +TEST(TErrorCodeTest, ImplicitCastTest) +{ + // assert TErrorCode is in scope + using NYT::TErrorCode; + bool equallyComparable = EquallyComparable<ETestEnumOne, ETestEnumTwo>; + EXPECT_FALSE(equallyComparable); +} + //////////////////////////////////////////////////////////////////////////////// } // namespace diff --git a/yt/yt/core/net/unittests/net_ut.cpp b/yt/yt/core/net/unittests/net_ut.cpp index 65fa6ad04e..62e3b0a4c1 100644 --- a/yt/yt/core/net/unittests/net_ut.cpp +++ b/yt/yt/core/net/unittests/net_ut.cpp @@ -252,10 +252,10 @@ TEST_F(TNetTest, StressConcurrentClose) .Run(); }; - runSender(a); - runReceiver(a); - runSender(b); - runReceiver(b); + YT_UNUSED_FUTURE(runSender(a)); + YT_UNUSED_FUTURE(runReceiver(a)); + YT_UNUSED_FUTURE(runSender(b)); + YT_UNUSED_FUTURE(runReceiver(b)); Sleep(TDuration::MilliSeconds(10)); a->Close().Get().ThrowOnError(); @@ -349,7 +349,7 @@ TEST_F(TNetTest, AbandonDial) auto listener = CreateListener(address, Poller_, Poller_); auto dialer = CreateDialer(); - dialer->Dial(listener->GetAddress()); + YT_UNUSED_FUTURE(dialer->Dial(listener->GetAddress())); }) .AsyncVia(Poller_->GetInvoker()) .Run() @@ -363,7 +363,7 @@ TEST_F(TNetTest, AbandonAccept) auto address = TNetworkAddress::CreateIPv6Loopback(0); auto listener = CreateListener(address, Poller_, Poller_); - listener->Accept(); + YT_UNUSED_FUTURE(listener->Accept()); }) .AsyncVia(Poller_->GetInvoker()) .Run() diff --git a/yt/yt/core/rpc/bus/channel.cpp b/yt/yt/core/rpc/bus/channel.cpp index 6c53708a72..66708fdd06 100644 --- a/yt/yt/core/rpc/bus/channel.cpp +++ b/yt/yt/core/rpc/bus/channel.cpp @@ -1044,7 +1044,7 @@ private: responseHandler, TStringBuf("Request acknowledgment failed"), TError(NRpc::EErrorCode::TransportError, "Request acknowledgment failed") - << error); + << error); } } diff --git a/yt/yt/core/rpc/dynamic_channel_pool.cpp b/yt/yt/core/rpc/dynamic_channel_pool.cpp index 4ab87efe91..5ce042662d 100644 --- a/yt/yt/core/rpc/dynamic_channel_pool.cpp +++ b/yt/yt/core/rpc/dynamic_channel_pool.cpp @@ -62,11 +62,11 @@ public: TGuid::Create(), EndpointDescription_, ServiceName_)) - , ViablePeerRegistry_(CreateViablePeerRegistry( + , ViablePeerRegistry_(CreateViablePeerRegistry( Config_, BIND(&TImpl::CreateChannel, Unretained(this)), Logger)) - , RandomPeerRotationExecutor_(New<TPeriodicExecutor>( + , RandomPeerRotationExecutor_(New<TPeriodicExecutor>( TDispatcher::Get()->GetLightInvoker(), BIND(&TDynamicChannelPool::TImpl::MaybeEvictRandomPeer, MakeWeak(this)), Config_->RandomPeerEvictionPeriod)) diff --git a/yt/yt/core/rpc/unittests/lib/test_service.proto b/yt/yt/core/rpc/unittests/lib/test_service.proto index ebb62f4eb5..79d5bff3de 100644 --- a/yt/yt/core/rpc/unittests/lib/test_service.proto +++ b/yt/yt/core/rpc/unittests/lib/test_service.proto @@ -2,7 +2,7 @@ package NTestRpc; import "yt_proto/yt/core/misc/proto/guid.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/rpc/unittests;testservice"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/rpc/unittests;testservice"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp index ffc59a05a1..3924bd6c20 100644 --- a/yt/yt/core/rpc/unittests/rpc_ut.cpp +++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp @@ -817,7 +817,7 @@ TYPED_TEST(TRpcTest, ConnectionLost) Sleep(TDuration::Seconds(0.5)); EXPECT_FALSE(asyncRspOrError.IsSet()); - this->Server_->Stop(false); + YT_UNUSED_FUTURE(this->Server_->Stop(false)); Sleep(TDuration::Seconds(2)); diff --git a/yt/yt/core/tracing/trace_context-inl.h b/yt/yt/core/tracing/trace_context-inl.h index 228498b548..0b74bf56d9 100644 --- a/yt/yt/core/tracing/trace_context-inl.h +++ b/yt/yt/core/tracing/trace_context-inl.h @@ -298,8 +298,23 @@ inline TTraceContextFinishGuard::TTraceContextFinishGuard(TTraceContextPtr trace inline TTraceContextFinishGuard::~TTraceContextFinishGuard() { + Release(); +} + +inline TTraceContextFinishGuard& TTraceContextFinishGuard::operator=(TTraceContextFinishGuard&& other) +{ + if (this != &other) { + Release(); + TraceContext_ = std::move(other.TraceContext_); + } + return *this; +} + +inline void TTraceContextFinishGuard::Release() +{ if (TraceContext_) { TraceContext_->Finish(); + TraceContext_ = {}; } } diff --git a/yt/yt/core/tracing/trace_context.h b/yt/yt/core/tracing/trace_context.h index 18acf3849e..9db890d695 100644 --- a/yt/yt/core/tracing/trace_context.h +++ b/yt/yt/core/tracing/trace_context.h @@ -346,8 +346,9 @@ public: TTraceContextFinishGuard(TTraceContextFinishGuard&&) = default; TTraceContextFinishGuard& operator=(const TTraceContextFinishGuard&) = delete; - TTraceContextFinishGuard& operator=(TTraceContextFinishGuard&&) = default; + TTraceContextFinishGuard& operator=(TTraceContextFinishGuard&&); + void Release(); private: TTraceContextPtr TraceContext_; }; diff --git a/yt/yt/core/yson/writer.cpp b/yt/yt/core/yson/writer.cpp index 1e623006c1..d31abf0b46 100644 --- a/yt/yt/core/yson/writer.cpp +++ b/yt/yt/core/yson/writer.cpp @@ -72,7 +72,7 @@ static inline size_t EscapeC(unsigned char c, char next, char r[ESCAPE_C_BUFFER_ r[0] = '\\'; r[1] = 't'; return 2; - } else if (c < 8 && !IsOctDigit(next)) { + } else if (c < 8 && !IsOctDigit(next)) { r[0] = '\\'; r[1] = OctDigit(c); return 2; diff --git a/yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp b/yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp index c8b3d1a518..77a425bc3c 100644 --- a/yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp +++ b/yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp @@ -71,7 +71,7 @@ TEST(TLazyYPathServiceTest, SimpleTypes) .Item("key4").Value(true) .Item("key5").Value(0.1) .Item("key6").Entity() - .EndMap(); + .EndMap(); })); EXPECT_EQ(FluentString().Value(42), YPathGet(service, "/key1")); @@ -92,7 +92,7 @@ TEST(TLazyYPathServiceTest, QueryNestedKeySimple) .Item("subkey1").Value("abc") .Item("subkey2").Value(43) .EndMap() - .EndMap(); + .EndMap(); })); EXPECT_EQ(FluentString().Value("abc"), YPathGet(service, "/key2/subkey1")); @@ -242,7 +242,7 @@ TEST(TLazyYPathServiceTest, InexistentPaths) .Item("subkey1").Value("abc") .Item("subkey2").Value(43) .EndMap() - .EndMap(); + .EndMap(); })); EXPECT_THROW_WITH_SUBSTRING(YPathGet(service, "/nonExistent"), "Failed to resolve YPath"); @@ -265,7 +265,7 @@ TEST(TLazyYPathServiceTest, ExistsVerb) .Item("subkey1").Value("abc") .Item("subkey2").Value(43) .EndMap() - .EndMap(); + .EndMap(); })); EXPECT_TRUE(YPathExists(service, "/key1")); @@ -293,7 +293,7 @@ TEST(TLazyYPathServiceTest, ListVerb) .Item("subkey1").Value("abc") .Item("subkey2").Value(43) .EndMap() - .EndMap(); + .EndMap(); })); EXPECT_EQ((std::vector<TString> {"key1", "key2"}), YPathList(service, "")); @@ -310,7 +310,7 @@ TEST(TLazyYPathServiceTest, RootAttributes) .EndAttributes() .BeginMap() .Item("key1").Value(42) - .EndMap(); + .EndMap(); })); auto expectedAttrs = FluentString().BeginMap() diff --git a/yt/yt/core/ytree/unittests/service_combiner_ut.cpp b/yt/yt/core/ytree/unittests/service_combiner_ut.cpp index 5a0f03eb6d..230b03ab5e 100644 --- a/yt/yt/core/ytree/unittests/service_combiner_ut.cpp +++ b/yt/yt/core/ytree/unittests/service_combiner_ut.cpp @@ -78,7 +78,7 @@ TEST(TYPathServiceCombinerTest, Simple) .Item("subkey1").Value("abc") .Item("subkey2").Value(3.1415926) .EndMap() - .EndMap(); + .EndMap(); })); IYPathServicePtr service2 = IYPathService::FromProducer(BIND([] (IYsonConsumer* consumer) { BuildYsonFluently(consumer) diff --git a/yt/yt/core/ytree/ypath_client.h b/yt/yt/core/ytree/ypath_client.h index 7169fbc0d7..8f4c51cf18 100644 --- a/yt/yt/core/ytree/ypath_client.h +++ b/yt/yt/core/ytree/ypath_client.h @@ -17,7 +17,7 @@ namespace NYT::NYTree { //////////////////////////////////////////////////////////////////////////////// class TYPathRequest - : public NRpc::IClientRequest + : public NRpc::IClientRequest { public: //! Enables tagging requests with arbitrary payload. diff --git a/yt/yt/core/ytree/ypath_detail.cpp b/yt/yt/core/ytree/ypath_detail.cpp index 4d6fb4ba50..bb8aed4797 100644 --- a/yt/yt/core/ytree/ypath_detail.cpp +++ b/yt/yt/core/ytree/ypath_detail.cpp @@ -582,7 +582,7 @@ TFuture<TYsonString> TSupportsAttributes::DoGetAttribute( &TSupportsAttributes::DoGetAttributeFragment, key, TYPath(tokenizer.GetInput()))); - } + } } namespace { diff --git a/yt/yt/library/formats/arrow_parser.cpp b/yt/yt/library/formats/arrow_parser.cpp index 2952630baf..5c9d4741d2 100644 --- a/yt/yt/library/formats/arrow_parser.cpp +++ b/yt/yt/library/formats/arrow_parser.cpp @@ -12,10 +12,12 @@ #include <util/stream/buffer.h> #include <contrib/libs/apache/arrow/cpp/src/arrow/api.h> +#include <contrib/libs/apache/arrow/cpp/src/arrow/type_fwd.h> + #include <contrib/libs/apache/arrow/cpp/src/arrow/io/api.h> #include <contrib/libs/apache/arrow/cpp/src/arrow/io/memory.h> + #include <contrib/libs/apache/arrow/cpp/src/arrow/ipc/api.h> -#include <contrib/libs/apache/arrow/cpp/src/arrow/type_fwd.h> namespace NYT::NFormats { @@ -29,138 +31,144 @@ namespace { void ThrowOnError(const arrow::Status& status) { if (!status.ok()) { - THROW_ERROR_EXCEPTION("%Qlv", status.message()); + THROW_ERROR_EXCEPTION("Arrow error occurred: %Qv", status.message()); } } //////////////////////////////////////////////////////////////////////////////// -class ArraySimpleVisitor +class TArraySimpleVisitor : public arrow::TypeVisitor { public: - ArraySimpleVisitor( + TArraySimpleVisitor( int columnId, - const std::shared_ptr<arrow::Array>& array, - const std::shared_ptr<TChunkedOutputStream>& bufferForStringLikeValues, - TUnversionedRowValues& rowValues) + std::shared_ptr<arrow::Array> array, + std::shared_ptr<TChunkedOutputStream> bufferForStringLikeValues, + TUnversionedRowValues* rowValues) : ColumnId_(columnId) - , Array_(array) - , bufferForStringLikeValues_( bufferForStringLikeValues) + , Array_(std::move(array)) + , BufferForStringLikeValues_(std::move(bufferForStringLikeValues)) , RowValues_(rowValues) - { }; + { } // Signed int types. - arrow::Status Visit(const arrow::Int8Type&) override + arrow::Status Visit(const arrow::Int8Type& /*type*/) override { return ParseInt64<arrow::Int8Array>(); } - arrow::Status Visit(const arrow::Int16Type&) override + arrow::Status Visit(const arrow::Int16Type& /*type*/) override { return ParseInt64<arrow::Int16Array>(); } - arrow::Status Visit(const arrow::Int32Type&) override + arrow::Status Visit(const arrow::Int32Type& /*type*/) override { return ParseInt64<arrow::Int32Array>(); } - arrow::Status Visit(const arrow::Int64Type&) override + arrow::Status Visit(const arrow::Int64Type& /*type*/) override { return ParseInt64<arrow::Int64Array>(); } - arrow::Status Visit(const arrow::Date32Type&) override + arrow::Status Visit(const arrow::Date32Type& /*type*/) override { return ParseInt64<arrow::Date32Array>(); } - arrow::Status Visit(const arrow::Time32Type&) override + arrow::Status Visit(const arrow::Time32Type& /*type*/) override { return ParseInt64<arrow::Time32Array>(); } - arrow::Status Visit(const arrow::Date64Type&) override + arrow::Status Visit(const arrow::Date64Type& /*type*/) override { return ParseInt64<arrow::Date64Array>(); } - arrow::Status Visit(const arrow::Time64Type&) override + arrow::Status Visit(const arrow::Time64Type& /*type*/) override { return ParseInt64<arrow::Time64Array>(); } - arrow::Status Visit(const arrow::TimestampType&) override + arrow::Status Visit(const arrow::TimestampType& /*type*/) override { return ParseInt64<arrow::TimestampArray>(); } // Unsigned int types. - arrow::Status Visit(const arrow::UInt8Type&) override + arrow::Status Visit(const arrow::UInt8Type& /*type*/) override { return ParseUInt64<arrow::UInt8Array>(); } - arrow::Status Visit(const arrow::UInt16Type&) override + arrow::Status Visit(const arrow::UInt16Type& /*type*/) override { return ParseUInt64<arrow::UInt16Array>(); } - arrow::Status Visit(const arrow::UInt32Type&) override + arrow::Status Visit(const arrow::UInt32Type& /*type*/) override { return ParseUInt64<arrow::UInt32Array>(); } - arrow::Status Visit(const arrow::UInt64Type&) override + arrow::Status Visit(const arrow::UInt64Type& /*type*/) override { return ParseUInt64<arrow::UInt64Array>(); } // Float types. - arrow::Status Visit(const arrow::HalfFloatType&) override + arrow::Status Visit(const arrow::HalfFloatType& /*type*/) override { return ParseDouble<arrow::HalfFloatArray>(); } - arrow::Status Visit(const arrow::FloatType&) override + arrow::Status Visit(const arrow::FloatType& /*type*/) override { return ParseDouble<arrow::FloatArray>(); } - arrow::Status Visit(const arrow::DoubleType&) override + arrow::Status Visit(const arrow::DoubleType& /*type*/) override { return ParseDouble<arrow::DoubleArray>(); } // String types. - arrow::Status Visit(const arrow::StringType&) override + arrow::Status Visit(const arrow::StringType& /*type*/) override { - return ParseString<arrow::StringArray>(); + return ParseStringLikeArray<arrow::StringArray>(); } - arrow::Status Visit(const arrow::BinaryType&) override + arrow::Status Visit(const arrow::BinaryType& /*type*/) override { - return ParseString<arrow::BinaryArray>(); + return ParseStringLikeArray<arrow::BinaryArray>(); } // Boolean type. - arrow::Status Visit(const arrow::BooleanType&) override + arrow::Status Visit(const arrow::BooleanType& /*type*/) override { return ParseBoolean(); } // Null type. - arrow::Status Visit(const arrow::NullType&) override + arrow::Status Visit(const arrow::NullType& /*type*/) override { return ParseNull(); } private: + const i64 ColumnId_; + + std::shared_ptr<arrow::Array> Array_; + std::shared_ptr<TChunkedOutputStream> BufferForStringLikeValues_; + TUnversionedRowValues* RowValues_; + template <typename ArrayType> arrow::Status ParseInt64() { - auto makeUnversionedValue = [] (int64_t value, int64_t columnId) { + auto makeUnversionedValue = [] (i64 value, i64 columnId) { return MakeUnversionedInt64Value(value, columnId); }; ParseSimpleNumeric<ArrayType, decltype(makeUnversionedValue)>(makeUnversionedValue); @@ -170,7 +178,7 @@ private: template <typename ArrayType> arrow::Status ParseUInt64() { - auto makeUnversionedValue = [] (int64_t value, int64_t columnId) { + auto makeUnversionedValue = [] (i64 value, i64 columnId) { return MakeUnversionedUint64Value(value, columnId); }; ParseSimpleNumeric<ArrayType, decltype(makeUnversionedValue)>(makeUnversionedValue); @@ -180,7 +188,7 @@ private: template <typename ArrayType> arrow::Status ParseDouble() { - auto makeUnversionedValue = [] (double value, int64_t columnId) { + auto makeUnversionedValue = [] (double value, i64 columnId) { return MakeUnversionedDoubleValue(value, columnId); }; ParseSimpleNumeric<ArrayType, decltype(makeUnversionedValue)>(makeUnversionedValue); @@ -188,36 +196,36 @@ private: } template <typename ArrayType, typename FuncType> - void ParseSimpleNumeric(FuncType makeUnversionedValue) + void ParseSimpleNumeric(FuncType makeUnversionedValueFunc) { - auto intArray = std::static_pointer_cast<ArrayType>(Array_); - for (int rowIndex = 0; rowIndex < intArray->length(); rowIndex++) { - if (intArray->IsNull(rowIndex)) { - RowValues_[rowIndex] = MakeUnversionedNullValue(ColumnId_); + auto array = std::static_pointer_cast<ArrayType>(Array_); + for (int rowIndex = 0; rowIndex < array->length(); ++rowIndex) { + if (array->IsNull(rowIndex)) { + (*RowValues_)[rowIndex] = MakeUnversionedNullValue(ColumnId_); } else { - RowValues_[rowIndex] = makeUnversionedValue(intArray->Value(rowIndex), ColumnId_); + (*RowValues_)[rowIndex] = makeUnversionedValueFunc(array->Value(rowIndex), ColumnId_); } } } template <typename ArrayType> - arrow::Status ParseString() + arrow::Status ParseStringLikeArray() { - auto stringArray = std::static_pointer_cast<ArrayType>(Array_); - for (int rowIndex = 0; rowIndex < stringArray->length(); rowIndex++) { - if (stringArray->IsNull(rowIndex)) { - RowValues_[rowIndex] = MakeUnversionedNullValue(ColumnId_); + auto array = std::static_pointer_cast<ArrayType>(Array_); + for (int rowIndex = 0; rowIndex < array->length(); ++rowIndex) { + if (array->IsNull(rowIndex)) { + (*RowValues_)[rowIndex] = MakeUnversionedNullValue(ColumnId_); } else { - auto stringElement = stringArray->GetView(rowIndex); - char* buffer = bufferForStringLikeValues_->Preallocate(stringElement.size()); + auto element = array->GetView(rowIndex); + char* buffer = BufferForStringLikeValues_->Preallocate(element.size()); std::memcpy( buffer, - stringElement.data(), - stringElement.size()); - bufferForStringLikeValues_->Advance(stringElement.size()); - auto value = TStringBuf(buffer, stringElement.size()); + element.data(), + element.size()); + BufferForStringLikeValues_->Advance(element.size()); + auto value = TStringBuf(buffer, element.size()); - RowValues_[rowIndex] = MakeUnversionedStringValue(value, ColumnId_); + (*RowValues_)[rowIndex] = MakeUnversionedStringValue(value, ColumnId_); } } return arrow::Status::OK(); @@ -225,12 +233,12 @@ private: arrow::Status ParseBoolean() { - auto boolArray = std::static_pointer_cast<arrow::BooleanArray>(Array_); - for (int rowIndex = 0; rowIndex < boolArray->length(); rowIndex++) { - if (boolArray->IsNull(rowIndex)) { - RowValues_[rowIndex] = MakeUnversionedNullValue(ColumnId_); + auto array = std::static_pointer_cast<arrow::BooleanArray>(Array_); + for (int rowIndex = 0; rowIndex < array->length(); rowIndex++) { + if (array->IsNull(rowIndex)) { + (*RowValues_)[rowIndex] = MakeUnversionedNullValue(ColumnId_); } else { - RowValues_[rowIndex] = MakeUnversionedBooleanValue(boolArray->Value(rowIndex), ColumnId_); + (*RowValues_)[rowIndex] = MakeUnversionedBooleanValue(array->Value(rowIndex), ColumnId_); } } return arrow::Status::OK(); @@ -238,160 +246,163 @@ private: arrow::Status ParseNull() { - auto nullArray = std::static_pointer_cast<arrow::NullArray>(Array_); - for (int rowIndex = 0; rowIndex < nullArray->length(); rowIndex++) { - RowValues_[rowIndex] = MakeUnversionedNullValue(ColumnId_); + auto array = std::static_pointer_cast<arrow::NullArray>(Array_); + for (int rowIndex = 0; rowIndex < array->length(); rowIndex++) { + (*RowValues_)[rowIndex] = MakeUnversionedNullValue(ColumnId_); } return arrow::Status::OK(); } - -private: - const int64_t ColumnId_; - const std::shared_ptr<arrow::Array>& Array_; - std::shared_ptr<TChunkedOutputStream> bufferForStringLikeValues_; - TUnversionedRowValues& RowValues_; }; //////////////////////////////////////////////////////////////////////////////// -class ArrayCompositeVisitor +class TArrayCompositeVisitor : public arrow::TypeVisitor { public: - ArrayCompositeVisitor( + TArrayCompositeVisitor( const std::shared_ptr<arrow::Array>& array, NYson::TCheckedInDebugYsonTokenWriter* writer, int rowIndex) : RowIndex_(rowIndex) , Array_(array) , Writer_(writer) - { }; + { + YT_VERIFY(writer != nullptr); + } // Signed integer types. - arrow::Status Visit(const arrow::Int8Type&) override + arrow::Status Visit(const arrow::Int8Type& /*type*/) override { return ParseInt64<arrow::Int8Array>(); } - arrow::Status Visit(const arrow::Int16Type&) override + arrow::Status Visit(const arrow::Int16Type& /*type*/) override { return ParseInt64<arrow::Int16Array>(); } - arrow::Status Visit(const arrow::Int32Type&) override + arrow::Status Visit(const arrow::Int32Type& /*type*/) override { return ParseInt64<arrow::Int32Array>(); } - arrow::Status Visit(const arrow::Int64Type&) override + arrow::Status Visit(const arrow::Int64Type& /*type*/) override { return ParseInt64<arrow::Int64Array>(); } - arrow::Status Visit(const arrow::Date32Type&) override + arrow::Status Visit(const arrow::Date32Type& /*type*/) override { return ParseInt64<arrow::Date32Array>(); } - arrow::Status Visit(const arrow::Time32Type&) override + arrow::Status Visit(const arrow::Time32Type& /*type*/) override { return ParseInt64<arrow::Time32Array>(); } - arrow::Status Visit(const arrow::Date64Type&) override + arrow::Status Visit(const arrow::Date64Type& /*type*/) override { return ParseInt64<arrow::Date64Array>(); } - arrow::Status Visit(const arrow::Time64Type&) override + arrow::Status Visit(const arrow::Time64Type& /*type*/) override { return ParseInt64<arrow::Time64Array>(); } - arrow::Status Visit(const arrow::TimestampType&) override + arrow::Status Visit(const arrow::TimestampType& /*type*/) override { return ParseInt64<arrow::TimestampArray>(); } // Unsigned integer types. - arrow::Status Visit(const arrow::UInt8Type&) override + arrow::Status Visit(const arrow::UInt8Type& /*type*/) override { return ParseUInt64<arrow::UInt8Array>(); } - arrow::Status Visit(const arrow::UInt16Type&) override + arrow::Status Visit(const arrow::UInt16Type& /*type*/) override { return ParseUInt64<arrow::UInt16Array>(); } - arrow::Status Visit(const arrow::UInt32Type&) override + arrow::Status Visit(const arrow::UInt32Type& /*type*/) override { return ParseUInt64<arrow::UInt32Array>(); } - arrow::Status Visit(const arrow::UInt64Type&) override + arrow::Status Visit(const arrow::UInt64Type& /*type*/) override { return ParseUInt64<arrow::UInt64Array>(); } // Float types. - arrow::Status Visit(const arrow::HalfFloatType&) override + arrow::Status Visit(const arrow::HalfFloatType& /*type*/) override { return ParseDouble<arrow::HalfFloatArray>(); } - arrow::Status Visit(const arrow::FloatType&) override + arrow::Status Visit(const arrow::FloatType& /*type*/) override { return ParseDouble<arrow::FloatArray>(); } - arrow::Status Visit(const arrow::DoubleType&) override + arrow::Status Visit(const arrow::DoubleType& /*type*/) override { return ParseDouble<arrow::DoubleArray>(); } // Binary types. - arrow::Status Visit(const arrow::StringType&) override + arrow::Status Visit(const arrow::StringType& /*type*/) override { - return ParseString<arrow::StringArray>(); + return ParseStringLikeArray<arrow::StringArray>(); } - arrow::Status Visit(const arrow::BinaryType&) override + + arrow::Status Visit(const arrow::BinaryType& /*type*/) override { - return ParseString<arrow::BinaryArray>(); + return ParseStringLikeArray<arrow::BinaryArray>(); } // Boolean types. - arrow::Status Visit(const arrow::BooleanType&) override + arrow::Status Visit(const arrow::BooleanType& /*type*/) override { return ParseBoolean(); } // Null types. - arrow::Status Visit(const arrow::NullType&) override + arrow::Status Visit(const arrow::NullType& /*type*/) override { return ParseNull(); } // Complex types. - arrow::Status Visit(const arrow::ListType&) override + arrow::Status Visit(const arrow::ListType& /*type*/) override { return ParseList(); } - arrow::Status Visit(const arrow::MapType&) override + arrow::Status Visit(const arrow::MapType& /*type*/) override { return ParseMap(); } - arrow::Status Visit(const arrow::StructType&) override + + arrow::Status Visit(const arrow::StructType& /*type*/) override { return ParseStruct(); } private: + const int RowIndex_; + + std::shared_ptr<arrow::Array> Array_; + NYson::TCheckedInDebugYsonTokenWriter* Writer_ = nullptr; + template <typename ArrayType> arrow::Status ParseInt64() { - auto writeNumericValue = [] (NYson::TCheckedInDebugYsonTokenWriter* writer, int64_t value) { + auto writeNumericValue = [] (NYson::TCheckedInDebugYsonTokenWriter* writer, i64 value) { writer->WriteBinaryInt64(value); }; ParseComplexNumeric<ArrayType, decltype(writeNumericValue)>(writeNumericValue); @@ -421,35 +432,34 @@ private: template <typename ArrayType, typename FuncType> void ParseComplexNumeric(FuncType writeNumericValue) { - auto intArray = std::static_pointer_cast<ArrayType>(Array_); - if (intArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast<ArrayType>(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { - writeNumericValue(Writer_, intArray->Value(RowIndex_)); + writeNumericValue(Writer_, array->Value(RowIndex_)); } } template <typename ArrayType> - arrow::Status ParseString() + arrow::Status ParseStringLikeArray() { - auto stringArray = std::static_pointer_cast<ArrayType>(Array_); - if (stringArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast<ArrayType>(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { - auto stringElement = stringArray->GetView(RowIndex_); - auto value = TStringBuf(stringElement.data(), stringElement.size()); - Writer_->WriteBinaryString(value); + auto element = array->GetView(RowIndex_); + Writer_->WriteBinaryString(TStringBuf(element.data(), element.size())); } return arrow::Status::OK(); } arrow::Status ParseBoolean() { - auto boolArray = std::static_pointer_cast<arrow::BooleanArray>(Array_); - if (boolArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast<arrow::BooleanArray>(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { - Writer_->WriteBinaryBoolean(boolArray->Value(RowIndex_)); + Writer_->WriteBinaryBoolean(array->Value(RowIndex_)); } return arrow::Status::OK(); } @@ -462,17 +472,16 @@ private: arrow::Status ParseList() { - auto listArray = std::static_pointer_cast<arrow::ListArray>(Array_); - if (listArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast<arrow::ListArray>(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { Writer_->WriteBeginList(); - auto column = listArray->value_slice(RowIndex_); - - for (int RowIndex_ = 0; RowIndex_ < column->length(); RowIndex_++) { - ArrayCompositeVisitor visitor(column, Writer_, RowIndex_); - ThrowOnError(column->type()->Accept(&visitor)); + auto listValue = array->value_slice(RowIndex_); + for (int offset = 0; offset < listValue->length(); ++offset) { + TArrayCompositeVisitor visitor(listValue, Writer_, offset); + ThrowOnError(listValue->type()->Accept(&visitor)); Writer_->WriteItemSeparator(); } @@ -484,29 +493,31 @@ private: arrow::Status ParseMap() { - auto mapArray = std::static_pointer_cast<arrow::MapArray>(Array_); - if (mapArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast<arrow::MapArray>(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { - auto mapArrayElement = std::static_pointer_cast<arrow::StructArray>(mapArray->value_slice(RowIndex_)); + auto element = std::static_pointer_cast<arrow::StructArray>( + array->value_slice(RowIndex_)); - auto keyColumn = mapArrayElement->GetFieldByName("key"); - auto valueColumn = mapArrayElement->GetFieldByName("value"); + auto keyList = element->GetFieldByName("key"); + auto valueList = element->GetFieldByName("value"); Writer_->WriteBeginList(); - for (int index = 0; index < keyColumn->length(); index++) { - Writer_->WriteBeginList(); - ArrayCompositeVisitor keyVisitor(keyColumn, Writer_, index); + for (int offset = 0; offset < keyList->length(); ++offset) { + Writer_->WriteBeginList(); - ThrowOnError(keyColumn->type()->Accept(&keyVisitor)); + TArrayCompositeVisitor keyVisitor(keyList, Writer_, offset); + ThrowOnError(keyList->type()->Accept(&keyVisitor)); Writer_->WriteItemSeparator(); - ArrayCompositeVisitor valueVisitor(valueColumn, Writer_, index); - ThrowOnError(valueColumn->type()->Accept(&valueVisitor)); + TArrayCompositeVisitor valueVisitor(valueList, Writer_, offset); + ThrowOnError(valueList->type()->Accept(&valueVisitor)); Writer_->WriteItemSeparator(); + Writer_->WriteEndList(); Writer_->WriteItemSeparator(); } @@ -518,38 +529,34 @@ private: arrow::Status ParseStruct() { - auto structArray = std::static_pointer_cast<arrow::StructArray>(Array_); - - if (structArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast<arrow::StructArray>(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { Writer_->WriteBeginList(); - for (int elementIndex = 0; elementIndex < structArray->num_fields(); elementIndex++) { - auto elementColumn = structArray->field(elementIndex); - ArrayCompositeVisitor elementVisitor(elementColumn, Writer_, RowIndex_); - ThrowOnError(elementColumn->type()->Accept(&elementVisitor)); + + for (int offset = 0; offset < array->num_fields(); ++offset) { + auto element = array->field(offset); + TArrayCompositeVisitor visitor(element, Writer_, RowIndex_); + ThrowOnError(element->type()->Accept(&visitor)); Writer_->WriteItemSeparator(); } + Writer_->WriteEndList(); } return arrow::Status::OK(); } - -private: - const int RowIndex_; - std::shared_ptr<arrow::Array> Array_; - NYson::TCheckedInDebugYsonTokenWriter* Writer_ = nullptr; }; //////////////////////////////////////////////////////////////////////////////// void CheckArrowType( const std::shared_ptr<arrow::DataType>& arrowType, - const std::initializer_list<arrow::Type::type>& allowedTypes) + std::initializer_list<arrow::Type::type> allowedTypes) { if (std::find(allowedTypes.begin(), allowedTypes.end(), arrowType->id()) == allowedTypes.end()) { - THROW_ERROR_EXCEPTION("Unexpected arrow type %Qlv", + THROW_ERROR_EXCEPTION("Unexpected arrow type %Qv", arrowType->name()); } } @@ -671,7 +678,12 @@ void CheckMatchingArrowTypes( case ESimpleLogicalValueType::Null: case ESimpleLogicalValueType::Void: - CheckArrowType(column->type(), {arrow::Type::NA, arrow::Type::DICTIONARY}); + CheckArrowType( + column->type(), + { + arrow::Type::NA, + arrow::Type::DICTIONARY + }); break; case ESimpleLogicalValueType::Uuid: @@ -706,7 +718,7 @@ void PrepareArrayForSimpleLogicalType( auto dictionaryValuesColumn = dictionaryColumn->dictionary(); CheckMatchingArrowTypes(columnType, dictionaryValuesColumn); - ArraySimpleVisitor visitor(columnId, dictionaryValuesColumn, bufferForStringLikeValues, dictionaryValues); + TArraySimpleVisitor visitor(columnId, dictionaryValuesColumn, bufferForStringLikeValues, &dictionaryValues); ThrowOnError(dictionaryColumn->dictionary()->type()->Accept(&visitor)); for (int offset = 0; offset < std::ssize(rowsValues[columnIndex]); offset++) { @@ -717,14 +729,14 @@ void PrepareArrayForSimpleLogicalType( } } } else { - ArraySimpleVisitor visitor(columnId, column, bufferForStringLikeValues, rowsValues[columnIndex]); + TArraySimpleVisitor visitor(columnId, column, bufferForStringLikeValues, &rowsValues[columnIndex]); ThrowOnError(column->type()->Accept(&visitor)); } } void PrepareArrayForComplexType( - TLogicalTypePtr denullifiedLogicalType, - const std::shared_ptr<TChunkedOutputStream>& bufferForStringLikeValues, + const TLogicalTypePtr& denullifiedLogicalType, + const std::shared_ptr<TChunkedOutputStream>& bufferForStringLikeValues, const std::shared_ptr<arrow::Array>& column, std::vector<TUnversionedRowValues>& rowsValues, int columnIndex, @@ -766,18 +778,18 @@ void PrepareArrayForComplexType( break; default: - THROW_ERROR_EXCEPTION("Unexpected arrow type in complex type %Qlv", column->type()->name()); + THROW_ERROR_EXCEPTION("Unexpected arrow type in complex type %Qv", column->type()->name()); } if (column->type()->id() == arrow::Type::BINARY) { TUnversionedRowValues stringValues(rowsValues[columnIndex].size()); - ArraySimpleVisitor visitor(columnId, column, bufferForStringLikeValues, stringValues); + TArraySimpleVisitor visitor(columnId, column, bufferForStringLikeValues, &stringValues); ThrowOnError(column->type()->Accept(&visitor)); for (int offset = 0; offset < std::ssize(rowsValues[columnIndex]); offset++) { if (column->IsNull(offset)) { rowsValues[columnIndex][offset] = MakeUnversionedNullValue(columnId); } else { - rowsValues[columnIndex][offset] = MakeUnversionedCompositeValue(stringValues[offset].AsStringBuf(), columnId); + rowsValues[columnIndex][offset] = MakeUnversionedCompositeValue(stringValues[offset].AsStringBuf(), columnId); } } } else { @@ -789,7 +801,7 @@ void PrepareArrayForComplexType( TBufferOutput out(valueBuffer); NYson::TCheckedInDebugYsonTokenWriter writer(&out); - ArrayCompositeVisitor visitor(column, &writer, rowIndex); + TArrayCompositeVisitor visitor(column, &writer, rowIndex); ThrowOnError(column->type()->Accept(&visitor)); @@ -811,8 +823,8 @@ void PrepareArrayForComplexType( } void PrepareArray( - TLogicalTypePtr denullifiedLogicalType, - const std::shared_ptr<TChunkedOutputStream>& bufferForStringLikeValues, + const TLogicalTypePtr& denullifiedLogicalType, + const std::shared_ptr<TChunkedOutputStream>& bufferForStringLikeValues, const std::shared_ptr<arrow::Array>& column, std::vector<TUnversionedRowValues>& rowsValues, int columnIndex, @@ -849,52 +861,65 @@ void PrepareArray( break; case ELogicalMetatype::Tagged: + // Denullified type should not contain tagged type. + YT_ABORT(); break; } } //////////////////////////////////////////////////////////////////////////////// -enum class ListenerState { +enum class EListenerState +{ EOS, RecordBatch, - InProgress + InProgress, + Empty, }; -class Listener +class TListener : public arrow::ipc::Listener { public: - Listener(IValueConsumer* valueConsumer) + explicit TListener(IValueConsumer* valueConsumer) : Consumer_(valueConsumer) { } arrow::Status OnEOS() override { - CurrentState_ = ListenerState::EOS; + CurrentState_ = EListenerState::EOS; return arrow::Status::OK(); } arrow::Status OnRecordBatchDecoded(std::shared_ptr<arrow::RecordBatch> batch) override { - CurrentState_ = ListenerState::RecordBatch; + CurrentState_ = EListenerState::RecordBatch; struct TArrowParserTag { }; - auto bufferForStringLikeValues = std::make_shared<TChunkedOutputStream>( + + auto bufferForStringLikeValues = std::make_shared<TChunkedOutputStream>( GetRefCountedTypeCookie<TArrowParserTag>(), 256_KB, 1_MB); - std::vector<TUnversionedRowValues> rowsValues(batch->num_columns(), TUnversionedRowValues(batch->num_rows())); - for (int columnIndex = 0; columnIndex < batch->num_columns(); columnIndex++) { - const auto columnId = Consumer_->GetNameTable()->GetIdOrRegisterName(batch->column_name(columnIndex)); - auto columnSchema = Consumer_->GetSchema()->FindColumn(batch->column_name(columnIndex)); - const auto columnType = columnSchema ? columnSchema->LogicalType() : OptionalLogicalType(SimpleLogicalType(ESimpleLogicalValueType::Any)); + auto numColumns = batch->num_columns(); + auto numRows = batch->num_rows(); + std::vector<TUnversionedRowValues> rowsValues(numColumns, TUnversionedRowValues(numRows)); + + for (int columnIndex = 0; columnIndex < numColumns; ++columnIndex) { + auto columnName = batch->column_name(columnIndex); + + auto columnId = Consumer_->GetNameTable()->GetIdOrRegisterName(columnName); + auto columnSchema = Consumer_->GetSchema()->FindColumn(columnName); + + auto columnType = columnSchema + ? columnSchema->LogicalType() + : OptionalLogicalType(SimpleLogicalType(ESimpleLogicalValueType::Any)); + auto denullifiedColumnType = DenullifyLogicalType(columnType); - const auto denullifiedLogicalType = DenullifyLogicalType(columnType); PrepareArray( - denullifiedLogicalType, + denullifiedColumnType, bufferForStringLikeValues, batch->column(columnIndex), rowsValues, @@ -902,9 +927,9 @@ public: columnId); } - for (int rowIndex = 0; rowIndex < batch->num_rows(); rowIndex++) { + for (int rowIndex = 0; rowIndex < numRows; ++rowIndex) { Consumer_->OnBeginRow(); - for (int columnIndex = 0; columnIndex < batch->num_columns(); columnIndex++) { + for (int columnIndex = 0; columnIndex < numColumns; ++columnIndex) { Consumer_->OnValue(rowsValues[columnIndex][rowIndex]); } Consumer_->OnEndRow(); @@ -914,20 +939,21 @@ public: void Reset() { - CurrentState_ = ListenerState::InProgress; + CurrentState_ = EListenerState::InProgress; } - ListenerState GetState() + EListenerState GetState() { return CurrentState_; } private: - ListenerState CurrentState_ = ListenerState::InProgress; - IValueConsumer* Consumer_; + IValueConsumer* const Consumer_; + + EListenerState CurrentState_ = EListenerState::InProgress; }; -std::shared_ptr<arrow::Buffer> MakeBuffer(const char* data, int64_t size) +std::shared_ptr<arrow::Buffer> MakeBuffer(const char* data, i64 size) { arrow::BufferBuilder bufferBuilder; ThrowOnError(bufferBuilder.Reserve(size)); @@ -944,55 +970,56 @@ class TArrowParser { public: TArrowParser(IValueConsumer* valueConsumer) - { - Listener_ = std::make_shared<Listener>(valueConsumer); - Decoder_ = std::make_shared<arrow::ipc::StreamDecoder>(Listener_); - } + : Listener_(std::make_shared<TListener>(valueConsumer)) + , Decoder_(std::make_shared<arrow::ipc::StreamDecoder>(Listener_)) + { } void Read(TStringBuf data) override { - int64_t restDataSize = data.Size(); - auto currentPtr = data.Data(); - while (restDataSize > 0) { - auto nextRequiredSize = Decoder_->next_required_size(); - - auto currentSize = std::min(reinterpret_cast<int64_t>(nextRequiredSize), restDataSize); + i64 restSize = data.Size(); + const char* currentPtr = data.Data(); + while (restSize > 0) { + i64 nextRequiredSize = Decoder_->next_required_size(); + auto currentSize = std::min(nextRequiredSize, restSize); ThrowOnError(Decoder_->Consume(MakeBuffer(currentPtr, currentSize))); LastState_ = Listener_->GetState(); switch (LastState_) { - case ListenerState::InProgress: + case EListenerState::InProgress: break; - case ListenerState::EOS: + case EListenerState::EOS: Decoder_ = std::make_shared<arrow::ipc::StreamDecoder>(Listener_); Listener_->Reset(); break; - case ListenerState::RecordBatch: + case EListenerState::RecordBatch: Listener_->Reset(); break; + + case EListenerState::Empty: + YT_ABORT(); } currentPtr += currentSize; - restDataSize -= currentSize; + restSize -= currentSize; } } void Finish() override { - if (LastState_ == ListenerState::InProgress) { + if (LastState_ == EListenerState::InProgress) { THROW_ERROR_EXCEPTION("Unexpected end of stream"); } } - private: - std::shared_ptr<Listener> Listener_; + const std::shared_ptr<TListener> Listener_; + std::shared_ptr<arrow::ipc::StreamDecoder> Decoder_; - ListenerState LastState_; + EListenerState LastState_ = EListenerState::Empty; }; } // namespace diff --git a/yt/yt/library/formats/skiff_writer.cpp b/yt/yt/library/formats/skiff_writer.cpp index cfe3306969..46d1bba126 100644 --- a/yt/yt/library/formats/skiff_writer.cpp +++ b/yt/yt/library/formats/skiff_writer.cpp @@ -1011,7 +1011,7 @@ private: SkiffWriter_->Flush(); TryFlushBuffer(false); } - Flush(); + YT_UNUSED_FUTURE(Flush()); } TFuture<void> Flush() override 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 d1bb3458d5..9d738c7122 100644 --- a/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp +++ b/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp @@ -262,7 +262,7 @@ TEST_F(TPiecewiseLinearFunctionTest, TestSortOrMergeImpl) 4, 4.1, 4.2, 4.3, 5, 5.1, 6, 6.1, 6.2 - } + } }, { /* Name */ "eightSortedSegments", @@ -286,7 +286,7 @@ TEST_F(TPiecewiseLinearFunctionTest, TestSortOrMergeImpl) 5, 5.1, 6, 6.1, 6.2, 7, 7.1 - } + } } }; diff --git a/yt/yt/library/process/process.cpp b/yt/yt/library/process/process.cpp index 809a50ed9a..28f699e398 100644 --- a/yt/yt/library/process/process.cpp +++ b/yt/yt/library/process/process.cpp @@ -234,8 +234,8 @@ bool TryResetSignals() //////////////////////////////////////////////////////////////////////////////// TProcessBase::TProcessBase(const TString& path) - : Path_(path) - , ProcessId_(InvalidProcessId) + : Path_(path) + , ProcessId_(InvalidProcessId) { } void TProcessBase::AddArgument(TStringBuf arg) diff --git a/yt/yt/library/process/unittests/pipes_ut.cpp b/yt/yt/library/process/unittests/pipes_ut.cpp index 1fb987f9e7..0c134176e7 100644 --- a/yt/yt/library/process/unittests/pipes_ut.cpp +++ b/yt/yt/library/process/unittests/pipes_ut.cpp @@ -108,7 +108,7 @@ TEST(TAsyncWriterTest, WriteFailed) ::memset(buffer.Begin(), 'a', buffer.Size()); auto asyncWriteResult = writer->Write(buffer); - reader->Abort(); + YT_UNUSED_FUTURE(reader->Abort()); EXPECT_FALSE(asyncWriteResult.Get().IsOK()) << ToString(asyncWriteResult.Get()); @@ -279,7 +279,7 @@ TEST_P(TPipeBigReadWriteTest, RealReadWrite) std::vector<char> data(dataSize, 'a'); - BIND([&] () { + YT_UNUSED_FUTURE(BIND([&] () { auto dice = std::bind( std::uniform_int_distribution<int>(0, 127), std::default_random_engine()); @@ -287,7 +287,7 @@ TEST_P(TPipeBigReadWriteTest, RealReadWrite) data[i] = dice(); } }) - .AsyncVia(queue->GetInvoker()).Run(); + .AsyncVia(queue->GetInvoker()).Run()); auto writeError = BIND(&WriteAll, Writer, data.data(), data.size(), blockSize) .AsyncVia(queue->GetInvoker()) diff --git a/yt/yt/library/profiling/solomon/remote.cpp b/yt/yt/library/profiling/solomon/remote.cpp index b335782a12..ee3f5b46c1 100644 --- a/yt/yt/library/profiling/solomon/remote.cpp +++ b/yt/yt/library/profiling/solomon/remote.cpp @@ -145,7 +145,7 @@ void TRemoteRegistry::Transfer(const NProto::TSensorDump& dump) transferValue(&sensorSet->TimeHistogramsCube_, ESensorType::TimeHistogram, NYT::FromProto<TTimeHistogramSnapshot>(projection.time_histogram())); } else if (projection.has_gauge_histogram()) { transferValue(&sensorSet->GaugeHistogramsCube_, ESensorType::GaugeHistogram, NYT::FromProto<TGaugeHistogramSnapshot>(projection.gauge_histogram())); - } else if (projection.has_rate_histogram()) { + } else if (projection.has_rate_histogram()) { transferValue(&sensorSet->RateHistogramsCube_, ESensorType::RateHistogram, NYT::FromProto<TRateHistogramSnapshot>(projection.rate_histogram())); } else { // Ignore unknown types. diff --git a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto index 0e8b3fe47a..be48295c39 100644 --- a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto +++ b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto @@ -4,7 +4,7 @@ option java_package = "tech.ytsaurus.rpcproxy"; option java_outer_classname = "ApiProtos"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/api/rpc_proxy"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/api/rpc_proxy"; import "yt_proto/yt/core/misc/proto/guid.proto"; import "yt_proto/yt/core/misc/proto/error.proto"; diff --git a/yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto b/yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto index d1ab837059..8ac0df236f 100644 --- a/yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto +++ b/yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto @@ -4,7 +4,7 @@ option java_package = "tech.ytsaurus"; option java_outer_classname = "DiscoveryProtos"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/api/rpc_proxy"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/api/rpc_proxy"; //------------------------------------------------------------------------------ diff --git a/yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto b/yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto index 1f85bdf866..fed0cc4df2 100644 --- a/yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto +++ b/yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto @@ -1,6 +1,6 @@ package NYT.NChaosClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chaos_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chaos_client"; import "yt_proto/yt/core/misc/proto/guid.proto"; diff --git a/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto b/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto index ea16c4ae7b..e6c778f4eb 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto @@ -2,7 +2,7 @@ package NYT.NChunkClient.NProto; import "yt_proto/yt/core/misc/proto/protobuf_helpers.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto b/yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto index 0f4f6cc146..a7626b4b35 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto @@ -4,7 +4,7 @@ import "yt_proto/yt/core/misc/proto/guid.proto"; import "yt_proto/yt/client/chunk_client/proto/read_limit.proto"; import "yt_proto/yt/client/chunk_client/proto/chunk_meta.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto b/yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto index e4bf8382f1..e76a5b4807 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto @@ -2,7 +2,7 @@ package NYT.NChunkClient.NProto; import "yt_proto/yt/core/misc/proto/guid.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto b/yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto index bf32df776f..9696458aac 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto @@ -1,6 +1,6 @@ package NYT.NChunkClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto b/yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto index e449cce8a5..f6a49a84e5 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto @@ -1,6 +1,6 @@ package NYT.NChunkClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto b/yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto index 6726ee393f..435dc51803 100644 --- a/yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto +++ b/yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto @@ -2,7 +2,7 @@ package NYT.NDiscoveryClient.NProto; import "yt_proto/yt/core/ytree/proto/attributes.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/discovery_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/discovery_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/hive/proto/cluster_directory.proto b/yt/yt_proto/yt/client/hive/proto/cluster_directory.proto index e5d59965d7..4a6a671b1b 100644 --- a/yt/yt_proto/yt/client/hive/proto/cluster_directory.proto +++ b/yt/yt_proto/yt/client/hive/proto/cluster_directory.proto @@ -1,6 +1,6 @@ package NYT.NHiveClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/hive"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/hive"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/hive/proto/timestamp_map.proto b/yt/yt_proto/yt/client/hive/proto/timestamp_map.proto index 93a23cdcc0..43f96bcf9f 100644 --- a/yt/yt_proto/yt/client/hive/proto/timestamp_map.proto +++ b/yt/yt_proto/yt/client/hive/proto/timestamp_map.proto @@ -1,6 +1,6 @@ package NYT.NHiveClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/hive"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/hive"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/misc/proto/bloom_filter.proto b/yt/yt_proto/yt/core/misc/proto/bloom_filter.proto index fb31c7127a..b950a6cec7 100644 --- a/yt/yt_proto/yt/core/misc/proto/bloom_filter.proto +++ b/yt/yt_proto/yt/core/misc/proto/bloom_filter.proto @@ -1,6 +1,6 @@ package NYT.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/misc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/misc"; message TBloomFilter { diff --git a/yt/yt_proto/yt/core/misc/proto/error.proto b/yt/yt_proto/yt/core/misc/proto/error.proto index 8cfc652a56..2e20bc0269 100644 --- a/yt/yt_proto/yt/core/misc/proto/error.proto +++ b/yt/yt_proto/yt/core/misc/proto/error.proto @@ -3,7 +3,7 @@ package NYT.NProto; option java_package = "tech.ytsaurus"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/misc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/misc"; import "yt_proto/yt/core/ytree/proto/attributes.proto"; diff --git a/yt/yt_proto/yt/core/misc/proto/guid.proto b/yt/yt_proto/yt/core/misc/proto/guid.proto index 34950daa8a..61f191bf24 100644 --- a/yt/yt_proto/yt/core/misc/proto/guid.proto +++ b/yt/yt_proto/yt/core/misc/proto/guid.proto @@ -4,7 +4,7 @@ option java_package = "tech.ytsaurus"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/misc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/misc"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto b/yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto index fc3ce08274..79b4f242a3 100644 --- a/yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto +++ b/yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto @@ -3,7 +3,7 @@ package NYT.NProto; option java_package = "tech.ytsaurus"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/misc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/misc"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/rpc/proto/rpc.proto b/yt/yt_proto/yt/core/rpc/proto/rpc.proto index 7d01c9082b..043b2953e2 100644 --- a/yt/yt_proto/yt/core/rpc/proto/rpc.proto +++ b/yt/yt_proto/yt/core/rpc/proto/rpc.proto @@ -3,7 +3,7 @@ package NYT.NRpc.NProto; option java_package = "tech.ytsaurus.rpc"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/rpc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/rpc"; import "yt_proto/yt/core/misc/proto/guid.proto"; diff --git a/yt/yt_proto/yt/core/tracing/proto/span.proto b/yt/yt_proto/yt/core/tracing/proto/span.proto index dce25abf99..9d08cc47a6 100644 --- a/yt/yt_proto/yt/core/tracing/proto/span.proto +++ b/yt/yt_proto/yt/core/tracing/proto/span.proto @@ -5,7 +5,7 @@ import "yt_proto/yt/core/misc/proto/guid.proto"; option java_package = "tech.ytsaurus.tracing"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/tracing"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/tracing"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto b/yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto index 1bf9482d63..8c2740493f 100644 --- a/yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto +++ b/yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto @@ -5,7 +5,7 @@ import "yt_proto/yt/core/misc/proto/guid.proto"; option java_package = "tech.ytsaurus.tracing"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/tracing"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/tracing"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto b/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto index 42c8ffbb8b..6496caa47e 100644 --- a/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto +++ b/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto @@ -1,6 +1,6 @@ package NYT.NYson.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/yson"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/yson"; import "google/protobuf/descriptor.proto"; diff --git a/yt/yt_proto/yt/core/ytree/proto/attributes.proto b/yt/yt_proto/yt/core/ytree/proto/attributes.proto index f936ba4fcb..cb1b90451e 100644 --- a/yt/yt_proto/yt/core/ytree/proto/attributes.proto +++ b/yt/yt_proto/yt/core/ytree/proto/attributes.proto @@ -5,7 +5,7 @@ import "yt_proto/yt/core/yson/proto/protobuf_interop.proto"; option java_package = "tech.ytsaurus.ytree"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/ytree"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/ytree"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto b/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto index db37024a09..646526cd78 100644 --- a/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto +++ b/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto @@ -1,6 +1,6 @@ package NYT.NYTree.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/ytree"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/ytree"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/ytree/proto/ypath.proto b/yt/yt_proto/yt/core/ytree/proto/ypath.proto index 983adc82e0..1342ac3ae9 100644 --- a/yt/yt_proto/yt/core/ytree/proto/ypath.proto +++ b/yt/yt_proto/yt/core/ytree/proto/ypath.proto @@ -4,7 +4,7 @@ import "yt_proto/yt/core/rpc/proto/rpc.proto"; import "yt_proto/yt/core/ytree/proto/attributes.proto"; import "yt_proto/yt/core/ytree/proto/request_complexity_limits.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/ytree"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/ytree"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/formats/extension.proto b/yt/yt_proto/yt/formats/extension.proto index 5d0a28f5a7..80a529ba95 100644 --- a/yt/yt_proto/yt/formats/extension.proto +++ b/yt/yt_proto/yt/formats/extension.proto @@ -2,7 +2,7 @@ import "google/protobuf/descriptor.proto"; package NYT; -option go_package = "github.com/ydb-platform/ydb/yt/yt_proto/yt/formats"; +option go_package = "a.yandex-team.ru/yt/yt_proto/yt/formats"; message EWrapperFieldFlag { diff --git a/yt/yt_proto/yt/formats/yamr.proto b/yt/yt_proto/yt/formats/yamr.proto index 9c9835bc2d..457de1f9fc 100644 --- a/yt/yt_proto/yt/formats/yamr.proto +++ b/yt/yt_proto/yt/formats/yamr.proto @@ -2,7 +2,7 @@ import "yt/yt_proto/yt/formats/extension.proto"; package NYT; -option go_package = "github.com/ydb-platform/ydb/yt/yt_proto/yt/formats"; +option go_package = "a.yandex-team.ru/yt/yt_proto/yt/formats"; message TYamr { optional string Key = 1 [(NYT.key_column_name) = "key"]; |