aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2024-01-11 14:49:03 +0100
committerGitHub <noreply@github.com>2024-01-11 14:49:03 +0100
commit2e180154bd6a38b90a128ba0463d0dd2706a5ccf (patch)
tree0e0890fa08e63af33c52c9b6eacee56d037a740b
parent4366d88bef9360d9754e77eaa1f4a25d046a9cbd (diff)
downloadydb-2e180154bd6a38b90a128ba0463d0dd2706a5ccf.tar.gz
Library import 7 (#937)
-rw-r--r--build/conf/go.conf7
-rw-r--r--build/external_resources/yexport/resources.json6
-rw-r--r--build/external_resources/ymake/public.resources.json10
-rw-r--r--build/external_resources/ymake/resources.json10
-rw-r--r--build/mapping.conf.json16
-rw-r--r--build/plugins/lib/test_const/__init__.py1
-rw-r--r--build/plugins/yql_python_udf.py2
-rw-r--r--build/scripts/clang_static_analyzer.py10
-rw-r--r--build/scripts/create_recursive_library_for_cmake.py201
-rw-r--r--build/scripts/gather_swig_java.cmake3
-rw-r--r--build/scripts/go_tool.py4
-rw-r--r--build/sysincl/unsorted.yml29
-rw-r--r--build/ymake.core.conf4
-rw-r--r--cmake/FindJNITarget.cmake33
-rw-r--r--cmake/conan-profiles/linux.aarch64.profile28
-rw-r--r--cmake/conan-profiles/macos.arm64.profile11
-rw-r--r--cmake/cuda.cmake188
-rw-r--r--cmake/cython.cmake41
-rw-r--r--cmake/fat_object.cmake8
-rw-r--r--cmake/global_vars.cmake41
-rw-r--r--cmake/recursive_library.cmake50
-rw-r--r--cmake/swig.cmake51
-rw-r--r--contrib/go/_std_1.21/src/crypto/dsa/dsa.go3
-rw-r--r--contrib/go/_std_1.21/src/crypto/x509/x509.go11
-rw-r--r--contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go1
-rw-r--r--contrib/go/_std_1.21/src/internal/buildcfg/exp.go3
-rw-r--r--contrib/go/_std_1.21/src/internal/bytealg/compare_native.go3
-rw-r--r--contrib/go/_std_1.21/src/internal/fuzz/trace.go3
-rw-r--r--contrib/go/_std_1.21/src/internal/godebug/godebug.go1
-rw-r--r--contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go1
-rw-r--r--contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go1
-rw-r--r--contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go1
-rw-r--r--contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go1
-rw-r--r--contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go1
-rw-r--r--contrib/go/_std_1.21/src/math/rand/rand.go1
-rw-r--r--contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go1
-rw-r--r--contrib/go/_std_1.21/src/net/netip/netip.go5
-rw-r--r--contrib/go/_std_1.21/src/os/file_unix.go1
-rw-r--r--contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go3
-rw-r--r--contrib/go/_std_1.21/src/runtime/cgo/iscgo.go3
-rw-r--r--contrib/go/_std_1.21/src/runtime/cgo/setenv.go3
-rw-r--r--contrib/go/_std_1.21/src/runtime/mgcpacer.go1
-rw-r--r--contrib/go/_std_1.21/src/runtime/rdebug.go3
-rw-r--r--contrib/go/_std_1.21/src/runtime/runtime_boring.go3
-rw-r--r--contrib/go/_std_1.21/src/runtime/sigqueue.go1
-rw-r--r--contrib/go/_std_1.21/src/runtime/timestub.go3
-rw-r--r--contrib/go/_std_1.21/src/time/time.go1
-rw-r--r--contrib/go/_std_1.21/src/time/tzdata/tzdata.go1
-rw-r--r--contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl3
-rw-r--r--contrib/libs/curl/bin/ya.make2
-rw-r--r--contrib/libs/curl/src/tool_main.c2
-rw-r--r--contrib/libs/cxxsupp/libsan/ya.make2
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt3
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
-rw-r--r--contrib/tools/bison/bison/data/yacc.c2
-rw-r--r--library/cpp/http/server/http_ut.cpp3
-rw-r--r--library/cpp/lwtrace/protos/lwtrace.proto2
-rw-r--r--library/cpp/unified_agent_client/proto/unified_agent.proto2
-rw-r--r--library/cpp/yt/misc/strong_typedef-inl.h8
-rw-r--r--library/cpp/yt/misc/unittests/strong_typedef_ut.cpp64
-rw-r--r--library/cpp/yt/misc/unittests/ya.make1
-rw-r--r--library/go/core/buildinfo/buildinfo.go2
-rw-r--r--library/go/core/buildinfo/test/main.go2
-rw-r--r--library/go/test/yatest/env.go2
-rw-r--r--library/recipes/docker_compose/lib/__init__.py2
-rw-r--r--library/recipes/docker_compose/lib/ya.make2
-rw-r--r--util/network/socket.cpp8
-rw-r--r--yt/cpp/mapreduce/client/client.h2
-rw-r--r--yt/cpp/mapreduce/client/operation.cpp18
-rw-r--r--yt/cpp/mapreduce/client/retry_heavy_write_request.h4
-rw-r--r--yt/cpp/mapreduce/client/retryful_writer.h2
-rw-r--r--yt/cpp/mapreduce/client/structured_table_formats.cpp2
-rw-r--r--yt/cpp/mapreduce/interface/config.cpp2
-rw-r--r--yt/cpp/mapreduce/interface/fluent.h2
-rw-r--r--yt/cpp/mapreduce/interface/job_statistics_ut.cpp156
-rw-r--r--yt/cpp/mapreduce/interface/operation.h2
-rw-r--r--yt/cpp/mapreduce/interface/serialize.cpp2
-rw-r--r--yt/cpp/mapreduce/interface/skiff_row.h16
-rw-r--r--yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp2
-rw-r--r--yt/yt/client/api/rpc_proxy/helpers.cpp15
-rw-r--r--yt/yt/client/arrow/arrow_row_stream_encoder.cpp6
-rw-r--r--yt/yt/client/chaos_client/replication_card.cpp3
-rw-r--r--yt/yt/client/chaos_client/replication_card_serialization.cpp2
-rw-r--r--yt/yt/client/driver/chaos_commands.cpp2
-rw-r--r--yt/yt/client/driver/cypress_commands.h2
-rw-r--r--yt/yt/client/driver/table_commands.cpp2
-rw-r--r--yt/yt/client/federated/unittests/client_ut.cpp2
-rw-r--r--yt/yt/client/hedging/hedging.cpp12
-rw-r--r--yt/yt/client/hedging/unittests/counters_ut.cpp31
-rw-r--r--yt/yt/client/table_client/helpers.cpp4
-rw-r--r--yt/yt/client/table_client/unittests/helpers/helpers.cpp2
-rw-r--r--yt/yt/client/table_client/unversioned_row.cpp2
-rw-r--r--yt/yt/client/table_client/versioned_row.cpp2
-rw-r--r--yt/yt/client/unittests/zookeeper_bus_ut.cpp2
-rw-r--r--yt/yt/client/ypath/rich.cpp40
-rw-r--r--yt/yt/client/ypath/rich.h4
-rw-r--r--yt/yt/core/actions/future.h4
-rw-r--r--yt/yt/core/bus/tcp/config.h2
-rw-r--r--yt/yt/core/bus/unittests/bus_ut.cpp2
-rw-r--r--yt/yt/core/concurrency/unittests/scheduler_ut.cpp20
-rw-r--r--yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp2
-rw-r--r--yt/yt/core/http/connection_pool.cpp2
-rw-r--r--yt/yt/core/http/unittests/http_ut.cpp2
-rw-r--r--yt/yt/core/misc/error-inl.h14
-rw-r--r--yt/yt/core/misc/error.h15
-rw-r--r--yt/yt/core/misc/persistent_queue-inl.h2
-rw-r--r--yt/yt/core/misc/proc.cpp10
-rw-r--r--yt/yt/core/misc/statistics-inl.h2
-rw-r--r--yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp12
-rw-r--r--yt/yt/core/misc/unittests/async_slru_cache_ut.cpp6
-rw-r--r--yt/yt/core/misc/unittests/enum_ut.cpp4
-rw-r--r--yt/yt/core/misc/unittests/error_code_ut.cpp25
-rw-r--r--yt/yt/core/net/unittests/net_ut.cpp12
-rw-r--r--yt/yt/core/rpc/bus/channel.cpp2
-rw-r--r--yt/yt/core/rpc/dynamic_channel_pool.cpp4
-rw-r--r--yt/yt/core/rpc/unittests/lib/test_service.proto2
-rw-r--r--yt/yt/core/rpc/unittests/rpc_ut.cpp2
-rw-r--r--yt/yt/core/tracing/trace_context-inl.h15
-rw-r--r--yt/yt/core/tracing/trace_context.h3
-rw-r--r--yt/yt/core/yson/writer.cpp2
-rw-r--r--yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp12
-rw-r--r--yt/yt/core/ytree/unittests/service_combiner_ut.cpp2
-rw-r--r--yt/yt/core/ytree/ypath_client.h2
-rw-r--r--yt/yt/core/ytree/ypath_detail.cpp2
-rw-r--r--yt/yt/library/formats/arrow_parser.cpp407
-rw-r--r--yt/yt/library/formats/skiff_writer.cpp2
-rw-r--r--yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp4
-rw-r--r--yt/yt/library/process/process.cpp4
-rw-r--r--yt/yt/library/process/unittests/pipes_ut.cpp6
-rw-r--r--yt/yt/library/profiling/solomon/remote.cpp2
-rw-r--r--yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto2
-rw-r--r--yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto2
-rw-r--r--yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto2
-rw-r--r--yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto2
-rw-r--r--yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto2
-rw-r--r--yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto2
-rw-r--r--yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto2
-rw-r--r--yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto2
-rw-r--r--yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto2
-rw-r--r--yt/yt_proto/yt/client/hive/proto/cluster_directory.proto2
-rw-r--r--yt/yt_proto/yt/client/hive/proto/timestamp_map.proto2
-rw-r--r--yt/yt_proto/yt/core/misc/proto/bloom_filter.proto2
-rw-r--r--yt/yt_proto/yt/core/misc/proto/error.proto2
-rw-r--r--yt/yt_proto/yt/core/misc/proto/guid.proto2
-rw-r--r--yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto2
-rw-r--r--yt/yt_proto/yt/core/rpc/proto/rpc.proto2
-rw-r--r--yt/yt_proto/yt/core/tracing/proto/span.proto2
-rw-r--r--yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto2
-rw-r--r--yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto2
-rw-r--r--yt/yt_proto/yt/core/ytree/proto/attributes.proto2
-rw-r--r--yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto2
-rw-r--r--yt/yt_proto/yt/core/ytree/proto/ypath.proto2
-rw-r--r--yt/yt_proto/yt/formats/extension.proto2
-rw-r--r--yt/yt_proto/yt/formats/yamr.proto2
156 files changed, 1292 insertions, 640 deletions
diff --git a/build/conf/go.conf b/build/conf/go.conf
index 44fdb693e3..c58492e17c 100644
--- a/build/conf/go.conf
+++ b/build/conf/go.conf
@@ -250,13 +250,11 @@ GO_LINK_EXE=
GO_LINK_EXE+=$GENERATE_MF
GO_LINK_EXE+=&& $GENERATE_VCS_C_INFO_NODEP
GO_LINK_EXE+=&& $GENERATE_VCS_GO_INFO_NODEP
-GO_LINK_EXE+=&& $COPY_PROFILE_RUNTIME
GO_LINK_EXE+=&& $_GO_LINK_EXE_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS)
GO_LINK_TEST=
GO_LINK_TEST+=$GENERATE_VCS_C_INFO_NODEP
GO_LINK_TEST+=&& $GENERATE_VCS_GO_INFO_NODEP
-GO_LINK_TEST+=&& $COPY_PROFILE_RUNTIME
GO_LINK_TEST+=&& $_GO_LINK_TEST_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS GO_TEST_FILES $_GO_TEST_SRCS_VALUE GO_XTEST_FILES $_GO_XTEST_SRCS_VALUE)
GO_LINK_DLL=
@@ -873,11 +871,6 @@ module GO_PROGRAM: _GO_BASE_UNIT {
_GO_BUILDMODE=++buildmode=pie
}
- when ($NEED_PROFILE_RUNTIME == "yes") {
- LDFLAGS+=-resource-dir=contrib/libs/clang-rt
- PEERDIR+=contrib/libs/clang${CLANG_VER}-rt/lib/profile
- }
-
when ($OPENSOURCE == "yes" && $AUTOCHECK == "yes") {
# FIXME: Replace AUTOCHECK == yes with _not a host platform_ check after YMAKE-218
MODULE_LICENSES_RESTRICTION_TYPES = ALLOW_ONLY
diff --git a/build/external_resources/yexport/resources.json b/build/external_resources/yexport/resources.json
index 837dc6a653..4d3bedd7a4 100644
--- a/build/external_resources/yexport/resources.json
+++ b/build/external_resources/yexport/resources.json
@@ -1,13 +1,13 @@
{
"by_platform": {
"darwin": {
- "uri": "sbr:5562968267"
+ "uri": "sbr:5641379824"
},
"darwin-arm64": {
- "uri": "sbr:5562965675"
+ "uri": "sbr:5641378801"
},
"linux": {
- "uri": "sbr:5562947428"
+ "uri": "sbr:5641398951"
}
}
}
diff --git a/build/external_resources/ymake/public.resources.json b/build/external_resources/ymake/public.resources.json
index cfe29ad8eb..b695ea101e 100644
--- a/build/external_resources/ymake/public.resources.json
+++ b/build/external_resources/ymake/public.resources.json
@@ -1,19 +1,19 @@
{
"by_platform": {
"darwin": {
- "uri": "sbr:5569062376"
+ "uri": "sbr:5622651213"
},
"darwin-arm64": {
- "uri": "sbr:5569072879"
+ "uri": "sbr:5622657921"
},
"linux": {
- "uri": "sbr:5569070627"
+ "uri": "sbr:5622653964"
},
"linux-aarch64": {
- "uri": "sbr:5569095361"
+ "uri": "sbr:5622652638"
},
"win32-clang-cl": {
- "uri": "sbr:5569066861"
+ "uri": "sbr:5622653810"
}
}
}
diff --git a/build/external_resources/ymake/resources.json b/build/external_resources/ymake/resources.json
index 0e5983e056..cf0a575548 100644
--- a/build/external_resources/ymake/resources.json
+++ b/build/external_resources/ymake/resources.json
@@ -1,19 +1,19 @@
{
"by_platform": {
"darwin": {
- "uri": "sbr:5569055879"
+ "uri": "sbr:5622649543"
},
"darwin-arm64": {
- "uri": "sbr:5569046692"
+ "uri": "sbr:5622648352"
},
"linux": {
- "uri": "sbr:5569080477"
+ "uri": "sbr:5622649049"
},
"linux-aarch64": {
- "uri": "sbr:5569058127"
+ "uri": "sbr:5622653320"
},
"win32-clang-cl": {
- "uri": "sbr:5569069854"
+ "uri": "sbr:5622653040"
}
}
}
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index 0ffef27084..c02eb6afe5 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -127,34 +127,42 @@
"5498749381": "https://devtools-registry.s3.yandex.net/5498749381",
"5534092912": "https://devtools-registry.s3.yandex.net/5534092912",
"5562971772": "https://devtools-registry.s3.yandex.net/5562971772",
+ "5641388522": "https://devtools-registry.s3.yandex.net/5641388522",
"5486590469": "https://devtools-registry.s3.yandex.net/5486590469",
"5498750509": "https://devtools-registry.s3.yandex.net/5498750509",
"5534043120": "https://devtools-registry.s3.yandex.net/5534043120",
"5562958333": "https://devtools-registry.s3.yandex.net/5562958333",
+ "5641392899": "https://devtools-registry.s3.yandex.net/5641392899",
"5486590393": "https://devtools-registry.s3.yandex.net/5486590393",
"5498735180": "https://devtools-registry.s3.yandex.net/5498735180",
"5534059422": "https://devtools-registry.s3.yandex.net/5534059422",
"5562961825": "https://devtools-registry.s3.yandex.net/5562961825",
+ "5641386025": "https://devtools-registry.s3.yandex.net/5641386025",
"5476908047": "https://devtools-registry.s3.yandex.net/5476908047",
"5509380757": "https://devtools-registry.s3.yandex.net/5509380757",
"5550834592": "https://devtools-registry.s3.yandex.net/5550834592",
"5569062376": "https://devtools-registry.s3.yandex.net/5569062376",
+ "5622651213": "https://devtools-registry.s3.yandex.net/5622651213",
"5476891477": "https://devtools-registry.s3.yandex.net/5476891477",
"5509369518": "https://devtools-registry.s3.yandex.net/5509369518",
"5550838146": "https://devtools-registry.s3.yandex.net/5550838146",
"5569072879": "https://devtools-registry.s3.yandex.net/5569072879",
+ "5622657921": "https://devtools-registry.s3.yandex.net/5622657921",
"5476896849": "https://devtools-registry.s3.yandex.net/5476896849",
"5509364024": "https://devtools-registry.s3.yandex.net/5509364024",
"5550826871": "https://devtools-registry.s3.yandex.net/5550826871",
"5569070627": "https://devtools-registry.s3.yandex.net/5569070627",
+ "5622653964": "https://devtools-registry.s3.yandex.net/5622653964",
"5476895322": "https://devtools-registry.s3.yandex.net/5476895322",
"5509360013": "https://devtools-registry.s3.yandex.net/5509360013",
"5550843115": "https://devtools-registry.s3.yandex.net/5550843115",
"5569095361": "https://devtools-registry.s3.yandex.net/5569095361",
+ "5622652638": "https://devtools-registry.s3.yandex.net/5622652638",
"5476896707": "https://devtools-registry.s3.yandex.net/5476896707",
"5509388614": "https://devtools-registry.s3.yandex.net/5509388614",
"5550838970": "https://devtools-registry.s3.yandex.net/5550838970",
"5569066861": "https://devtools-registry.s3.yandex.net/5569066861",
+ "5622653810": "https://devtools-registry.s3.yandex.net/5622653810",
"2980468199": "https://devtools-registry.s3.yandex.net/2980468199",
"5562224408": "https://devtools-registry.s3.yandex.net/5562224408"
},
@@ -285,34 +293,42 @@
"5498749381": "yexport for darwin",
"5534092912": "yexport for darwin",
"5562971772": "yexport for darwin",
+ "5641388522": "yexport for darwin",
"5486590469": "yexport for darwin-arm64",
"5498750509": "yexport for darwin-arm64",
"5534043120": "yexport for darwin-arm64",
"5562958333": "yexport for darwin-arm64",
+ "5641392899": "yexport for darwin-arm64",
"5486590393": "yexport for linux",
"5498735180": "yexport for linux",
"5534059422": "yexport for linux",
"5562961825": "yexport for linux",
+ "5641386025": "yexport for linux",
"5476908047": "ymake for darwin",
"5509380757": "ymake for darwin",
"5550834592": "ymake for darwin",
"5569062376": "ymake for darwin",
+ "5622651213": "ymake for darwin",
"5476891477": "ymake for darwin-arm64",
"5509369518": "ymake for darwin-arm64",
"5550838146": "ymake for darwin-arm64",
"5569072879": "ymake for darwin-arm64",
+ "5622657921": "ymake for darwin-arm64",
"5476896849": "ymake for linux",
"5509364024": "ymake for linux",
"5550826871": "ymake for linux",
"5569070627": "ymake for linux",
+ "5622653964": "ymake for linux",
"5476895322": "ymake for linux-aarch64",
"5509360013": "ymake for linux-aarch64",
"5550843115": "ymake for linux-aarch64",
"5569095361": "ymake for linux-aarch64",
+ "5622652638": "ymake for linux-aarch64",
"5476896707": "ymake.exe for win32-clang-cl",
"5509388614": "ymake.exe for win32-clang-cl",
"5550838970": "ymake.exe for win32-clang-cl",
"5569066861": "ymake.exe for win32-clang-cl",
+ "5622653810": "ymake.exe for win32-clang-cl",
"2980468199": "ytexec for linux",
"5562224408": "ytexec for linux"
},
diff --git a/build/plugins/lib/test_const/__init__.py b/build/plugins/lib/test_const/__init__.py
index e928f60155..d17a8a652b 100644
--- a/build/plugins/lib/test_const/__init__.py
+++ b/build/plugins/lib/test_const/__init__.py
@@ -139,6 +139,7 @@ CLANG_COVERAGE_TEST_TYPES = (
"coverage_extractor",
"exectest",
"gtest",
+ "go_test",
# java tests might use shared libraries
"java",
"py2test",
diff --git a/build/plugins/yql_python_udf.py b/build/plugins/yql_python_udf.py
index 5a0bb69c63..c45e5b7696 100644
--- a/build/plugins/yql_python_udf.py
+++ b/build/plugins/yql_python_udf.py
@@ -44,7 +44,7 @@ def onregister_yql_python_udf(unit, *args):
path = name + '.yql_python_udf.cpp'
libra_flag = '1' if add_libra_modules else '0'
- unit.onpython(
+ unit.onrun_python2(
[
'build/scripts/gen_yql_python_udf.py',
flavor,
diff --git a/build/scripts/clang_static_analyzer.py b/build/scripts/clang_static_analyzer.py
index 65df8816af..128d45fdad 100644
--- a/build/scripts/clang_static_analyzer.py
+++ b/build/scripts/clang_static_analyzer.py
@@ -3,9 +3,9 @@ import sys
import os
import re
import argparse
-import yaml
+import json
-CLANG_SA_CONFIG='static_analyzer.yaml'
+CLANG_SA_CONFIG='static_analyzer.json'
def parse_args():
parser = argparse.ArgumentParser()
@@ -31,7 +31,7 @@ def parse_config(config_file):
conf = None
try:
with open(config_file, 'r') as afile:
- conf = yaml.safe_load(afile)
+ conf = json.load(afile)
except:
conf = None
return conf
@@ -61,6 +61,10 @@ def main():
config_file = find_config(args.config_file)
conf = parse_config(config_file)
+ # Ensure we can read config
+ if not conf:
+ raise ValueError(f"Cant parse config file, check its syntax: {config_file}")
+
# Ensure we have at least one check
if ('checks' not in conf) or (not conf['checks']):
raise ValueError("There are no checks in the config file")
diff --git a/build/scripts/create_recursive_library_for_cmake.py b/build/scripts/create_recursive_library_for_cmake.py
new file mode 100644
index 0000000000..0023e7d02a
--- /dev/null
+++ b/build/scripts/create_recursive_library_for_cmake.py
@@ -0,0 +1,201 @@
+# Custom script is necessary because CMake does not yet support creating static libraries combined with dependencies
+# https://gitlab.kitware.com/cmake/cmake/-/issues/22975
+#
+# This script is intended to be used set as a CXX_LINKER_LAUNCHER property for recursive library targets.
+# It parses the linking command and transforms it to archiving commands combining static libraries from dependencies.
+
+import argparse
+import os
+import shlex
+import subprocess
+import sys
+import tempfile
+
+
+class Opts(object):
+ def __init__(self, args):
+ argparser = argparse.ArgumentParser(allow_abbrev=False)
+ argparser.add_argument('--cmake-binary-dir', required=True)
+ argparser.add_argument('--cmake-ar', required=True)
+ argparser.add_argument('--cmake-ranlib', required=True)
+ argparser.add_argument('--cmake-host-system-name', required=True)
+ argparser.add_argument('--cmake-cxx-standard-libraries')
+ argparser.add_argument('--global-part-suffix', required=True)
+ self.parsed_args, other_args = argparser.parse_known_args(args=args)
+
+ if len(other_args) < 2:
+ # must contain at least '--linking-cmdline' and orginal linking tool name
+ raise Exception('not enough arguments')
+ if other_args[0] != '--linking-cmdline':
+ raise Exception("expected '--linking-cmdline' arg, got {}".format(other_args[0]))
+
+ self.is_msvc_linker = other_args[1].endswith('\\link.exe')
+
+ is_host_system_windows = self.parsed_args.cmake_host_system_name == 'Windows'
+ std_libraries_to_exclude_from_input = (
+ set(self.parsed_args.cmake_cxx_standard_libraries.split())
+ if self.parsed_args.cmake_cxx_standard_libraries is not None
+ else set()
+ )
+ msvc_preserved_option_prefixes = [
+ 'errorreport',
+ 'machine:',
+ 'nodefaultlib',
+ 'nologo',
+ 'subsystem',
+ ]
+
+ self.preserved_options = []
+
+ # these variables can contain paths absolute or relative to CMAKE_BINARY_DIR
+ self.global_libs_and_objects_input = []
+ self.non_global_libs_input = []
+ self.output = None
+
+ def is_external_library(path):
+ """
+ Check whether this library has been built in this CMake project or came from Conan-provided dependencies
+ (these use absolute paths).
+ If it is a library that is added from some other path (like CUDA) return True
+ """
+ return not (os.path.exists(path) or os.path.exists(os.path.join(self.parsed_args.cmake_binary_dir, path)))
+
+ def process_input(args):
+ i = 0
+ is_in_whole_archive = False
+
+ while i < len(args):
+ arg = args[i]
+ if is_host_system_windows and ((arg[0] == '/') or (arg[0] == '-')):
+ arg_wo_specifier_lower = arg[1:].lower()
+ if arg_wo_specifier_lower.startswith('out:'):
+ self.output = arg[len('/out:') :]
+ elif arg_wo_specifier_lower.startswith('wholearchive:'):
+ lib_path = arg[len('/wholearchive:') :]
+ if not is_external_library(lib_path):
+ self.global_libs_and_objects_input.append(lib_path)
+ else:
+ for preserved_option_prefix in msvc_preserved_option_prefixes:
+ if arg_wo_specifier_lower.startswith(preserved_option_prefix):
+ self.preserved_options.append(arg)
+ break
+ # other flags are non-linking related and just ignored
+ elif arg[0] == '-':
+ if arg == '-o':
+ if (i + 1) >= len(args):
+ raise Exception('-o flag without an argument')
+ self.output = args[i + 1]
+ i += 1
+ elif arg == '-Wl,--whole-archive':
+ is_in_whole_archive = True
+ elif arg == '-Wl,--no-whole-archive':
+ is_in_whole_archive = False
+ elif arg.startswith('-Wl,-force_load,'):
+ lib_path = arg[len('-Wl,-force_load,') :]
+ if not is_external_library(lib_path):
+ self.global_libs_and_objects_input.append(lib_path)
+ elif arg == '-isysroot':
+ i += 1
+ # other flags are non-linking related and just ignored
+ elif arg[0] == '@':
+ # response file with args
+ with open(arg[1:]) as response_file:
+ parsed_args = shlex.shlex(response_file, posix=False, punctuation_chars=False)
+ parsed_args.whitespace_split = True
+ args_in_response_file = list(arg.strip('"') for arg in parsed_args)
+ process_input(args_in_response_file)
+ elif not is_external_library(arg):
+ if is_in_whole_archive or arg.endswith('.o') or arg.endswith('.obj'):
+ self.global_libs_and_objects_input.append(arg)
+ elif arg not in std_libraries_to_exclude_from_input:
+ self.non_global_libs_input.append(arg)
+ i += 1
+
+ process_input(other_args[2:])
+
+ if self.output is None:
+ raise Exception("No output specified")
+
+ if (len(self.global_libs_and_objects_input) == 0) and (len(self.non_global_libs_input) == 0):
+ raise Exception("List of input objects and libraries is empty")
+
+
+class FilesCombiner(object):
+ def __init__(self, opts):
+ self.opts = opts
+
+ archiver_tool_path = opts.parsed_args.cmake_ar
+ if sys.platform.startswith('darwin'):
+ # force LIBTOOL even if CMAKE_AR is defined because 'ar' under Darwin does not contain the necessary options
+ arch_type = 'LIBTOOL'
+ archiver_tool_path = 'libtool'
+ elif opts.is_msvc_linker:
+ arch_type = 'LIB'
+ elif opts.parsed_args.cmake_ar.endswith('llvm-ar'):
+ arch_type = 'LLVM_AR'
+ elif opts.parsed_args.cmake_ar.endswith('ar'):
+ arch_type = 'GNU_AR'
+ else:
+ raise Exception('Unsupported arch type for CMAKE_AR={}'.format(opts.parsed_args.cmake_ar))
+
+ self.archiving_cmd_prefix = [
+ sys.executable,
+ os.path.join(os.path.dirname(os.path.abspath(__file__)), 'link_lib.py'),
+ archiver_tool_path,
+ arch_type,
+ 'gnu', # llvm_ar_format, used only if arch_type == 'LLVM_AR'
+ opts.parsed_args.cmake_binary_dir,
+ 'None', # plugin. Unused for now
+ ]
+ # the remaining archiving cmd args are [output, .. input .. ]
+
+ def do(self, output, input_list):
+ input_file_path = None
+ try:
+ if self.opts.is_msvc_linker:
+ # use response file for input (because of Windows cmdline length limitations)
+
+ # can't use NamedTemporaryFile because of permissions issues on Windows
+ input_file_fd, input_file_path = tempfile.mkstemp()
+ try:
+ input_file = os.fdopen(input_file_fd, 'w')
+ for input in input_list:
+ if ' ' in input:
+ input_file.write('"{}" '.format(input))
+ else:
+ input_file.write('{} '.format(input))
+ input_file.flush()
+ finally:
+ os.close(input_file_fd)
+ input_args = ['@' + input_file_path]
+ else:
+ input_args = input_list
+
+ cmd = self.archiving_cmd_prefix + [output] + self.opts.preserved_options + input_args
+ subprocess.check_call(cmd)
+ finally:
+ if input_file_path is not None:
+ os.remove(input_file_path)
+
+ if not self.opts.is_msvc_linker:
+ subprocess.check_call([self.opts.parsed_args.cmake_ranlib, output])
+
+
+if __name__ == "__main__":
+ opts = Opts(sys.argv[1:])
+
+ output_prefix, output_ext = os.path.splitext(opts.output)
+ globals_output = output_prefix + opts.parsed_args.global_part_suffix + output_ext
+
+ if os.path.exists(globals_output):
+ os.remove(globals_output)
+ if os.path.exists(opts.output):
+ os.remove(opts.output)
+
+ files_combiner = FilesCombiner(opts)
+
+ if len(opts.global_libs_and_objects_input) > 0:
+ files_combiner.do(globals_output, opts.global_libs_and_objects_input)
+
+ if len(opts.non_global_libs_input) > 0:
+ files_combiner.do(opts.output, opts.non_global_libs_input)
diff --git a/build/scripts/gather_swig_java.cmake b/build/scripts/gather_swig_java.cmake
new file mode 100644
index 0000000000..fa0acf42c1
--- /dev/null
+++ b/build/scripts/gather_swig_java.cmake
@@ -0,0 +1,3 @@
+file(GLOB JAVA_FILES ${JAVA_SRC_DIR}/*.java)
+list(JOIN JAVA_FILES "\n" JAVA_LST_CONTENT)
+file(WRITE ${JAVA_LST} ${JAVA_LST_CONTENT})
diff --git a/build/scripts/go_tool.py b/build/scripts/go_tool.py
index 05db991498..26920553b5 100644
--- a/build/scripts/go_tool.py
+++ b/build/scripts/go_tool.py
@@ -26,6 +26,7 @@ vet_report_ext = '.vet.txt'
FIXED_CGO1_SUFFIX = '.fixed.cgo1.go'
COMPILE_OPTIMIZATION_FLAGS = ('-N',)
+IGNORED_FLAGS = ['-fprofile-instr-generate', '-fcoverage-mapping']
def get_trimpath_args(args):
@@ -117,7 +118,8 @@ def preprocess_args(args):
args.srcs = srcs
if args.extldflags:
- args.extldflags = pwa.ProcessWholeArchiveOption(args.targ_os).construct_cmd(args.extldflags)
+ tmp = [flag for flag in args.extldflags if flag not in IGNORED_FLAGS]
+ args.extldflags = pwa.ProcessWholeArchiveOption(args.targ_os).construct_cmd(tmp)
classify_srcs(args.srcs, args)
diff --git a/build/sysincl/unsorted.yml b/build/sysincl/unsorted.yml
index aad6f810b7..224064c661 100644
--- a/build/sysincl/unsorted.yml
+++ b/build/sysincl/unsorted.yml
@@ -917,35 +917,6 @@
- WinNT.h
- ../../VC/include/stdio.h
- ../ucrt/stdio.h
- #if defined(BUILDING_LIBCURL)
- - axTLS/ssl.h
- - certdb.h
- - cert.h
- - cyassl/error.h
- - cyassl/openssl/ssl.h
- - cyassl/ssl.h
- - nspr.h
- - polarssl/certs.h
- - polarssl/ctr_drbg.h
- - polarssl/entropy.h
- - polarssl/error.h
- - polarssl/havege.h
- - polarssl/net.h
- - polarssl/ssl.h
- - polarssl/version.h
- - polarssl/x509.h
- - prerror.h
- - prio.h
- - prtypes.h
- - qsossl.h
- - secerr.h
- - secitem.h
- - secmod.h
- - secport.h
- - spnegohelp.h
- - sslerr.h
- - sslproto.h
- #endif
- Activation.h
- android/native_window.h
- Windows.System.Threading.h
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index e2de30a050..e16ce95cf4 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -4418,7 +4418,7 @@ macro RUN_LUA(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_N
}
# tag:python-specific
-### @usage: PYTHON(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...])
+### @usage: RUN_PYTHON2(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...])
###
### Run a python script with $(PYTHON)/python built from devtools/huge_python.
### These macros are similar: RUN_PROGRAM, RUN_LUA, PYTHON.
@@ -4438,7 +4438,7 @@ macro RUN_LUA(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_N
###
### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
-macro PYTHON(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], INDUCED_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], Args...) {
+macro RUN_PYTHON2(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], INDUCED_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], Args...) {
.CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input:ScriptPath} $Args ${input;hide:IN} ${input;context=TEXT;hide:IN_NOPARSE} ${output_include;hide:OUTPUT_INCLUDES} $INDUCED_DEPS ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
.SEM=find_package Python2 && add_custom_command $_SET_ENV_FOR_CUSTOM_COMMAND($ENV) OUTPUT ${output:OUT} ${output;noauto:OUT_NOAUTO} ${output:STDOUT} ${output;noauto:STDOUT_NOAUTO} DEPENDS ${input:IN} ${input;context=TEXT:IN_NOPARSE} ${input:ScriptPath} ${tool:TOOL} ${pre=WORKING_DIRECTORY :CWD} COMMAND Python2::Interpreter ${input:ScriptPath} $Args ${pre=> :STDOUT} ${pre=> :STDOUT_NOAUTO} $_TARGET_SOURCES_FOR_HEADERS($OUT $OUT_NOAUTO $STDOUT $STDOUT_NOAUTO)
}
diff --git a/cmake/FindJNITarget.cmake b/cmake/FindJNITarget.cmake
new file mode 100644
index 0000000000..1c7f7d59a6
--- /dev/null
+++ b/cmake/FindJNITarget.cmake
@@ -0,0 +1,33 @@
+if(JNITarget_FIND_QUIETLY)
+ find_package(JNI QUIET)
+elseif(JNITarget_FIND_REQUIRED)
+ find_package(JNI REQUIRED)
+else()
+ find_package(JNI)
+endif()
+
+set(JNI_TARGET_INCLUDE_DIRS ${JNI_INCLUDE_DIRS})
+set(JNI_TARGET_LIBRARIES ${JNI_LIBRARIES})
+
+if (JNI_FOUND)
+ add_library(JNITarget::jni IMPORTED UNKNOWN)
+ set_property(TARGET JNITarget::jni PROPERTY
+ IMPORTED_LOCATION ${JAVA_JVM_LIBRARY}
+ )
+ set_property(TARGET JNITarget::jni PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}
+ )
+
+ add_library(JNITarget::jni_awt IMPORTED UNKNOWN)
+ set_property(TARGET JNITarget::jni_awt PROPERTY
+ IMPORTED_LOCATION ${JAVA_AWT_LIBRARY}
+ )
+ set_property(TARGET JNITarget::jni_awt PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_PATH}
+ )
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(JNITarget DEFAULT_MSG JNI_TARGET_LIBRARIES JNI_TARGET_INCLUDE_DIRS)
+
+mark_as_advanced(JNI_TARGET_INCLUDE_DIRS JNI_TARGET_LIBRARIES)
diff --git a/cmake/conan-profiles/linux.aarch64.profile b/cmake/conan-profiles/linux.aarch64.profile
deleted file mode 100644
index 6945b1d777..0000000000
--- a/cmake/conan-profiles/linux.aarch64.profile
+++ /dev/null
@@ -1,28 +0,0 @@
-include(default)
-
-target_host=aarch64-linux-gnu
-
-[settings]
-arch=armv8
-build_type=Release
-compiler=gcc
-compiler.libcxx=libstdc++11
-compiler.version=12
-compiler.cppstd=20
-os=Linux
-[options]
-
-[env]
-CONAN_CMAKE_FIND_ROOT_PATH=/usr/$target_host
-CONAN_CMAKE_SYSROOT=/usr/$target_host
-SYSROOT=/usr/$target_host
-CC=$target_host-gcc
-CXX=$target_host-g++
-CXXFLAGS="-I/usr/$target_host/include/"
-CFLAGS="-I/usr/$target_host/include/"
-CHOST=$target_host
-AR=$target_host-ar
-AS=$target_host-as
-RANLIB=$target_host-ranlib
-LD=$target_host-ld
-STRIP=$target_host-strip
diff --git a/cmake/conan-profiles/macos.arm64.profile b/cmake/conan-profiles/macos.arm64.profile
deleted file mode 100644
index 52ba46ab97..0000000000
--- a/cmake/conan-profiles/macos.arm64.profile
+++ /dev/null
@@ -1,11 +0,0 @@
-include(default)
-[settings]
-arch=armv8
-build_type=Release
-compiler=clang
-compiler.libcxx=libc++
-compiler.version=14
-compiler.cppstd=20
-os=Macos
-[options]
-[env]
diff --git a/cmake/cuda.cmake b/cmake/cuda.cmake
new file mode 100644
index 0000000000..5764bb65c3
--- /dev/null
+++ b/cmake/cuda.cmake
@@ -0,0 +1,188 @@
+if (HAVE_CUDA)
+ if(${CMAKE_VERSION} VERSION_LESS "3.17.0")
+ message(FATAL_ERROR "Build with CUDA requires at least cmake 3.17.0")
+ endif()
+
+ enable_language(CUDA)
+
+ include(global_flags)
+ include(common)
+
+ function(quote_if_contains_spaces OutVar Var)
+ if (Var MATCHES ".*[ ].*")
+ set(${OutVar} "\"${Var}\"" PARENT_SCOPE)
+ else()
+ set(${OutVar} ${Var} PARENT_SCOPE)
+ endif()
+ endfunction()
+
+ function(get_cuda_flags_from_cxx_flags OutCudaFlags CxxFlags)
+ # OutCudaFlags is an output string
+ # CxxFlags is a string
+
+ set(skipList
+ -gline-tables-only
+ # clang coverage
+ -fprofile-instr-generate
+ -fcoverage-mapping
+ /Zc:inline # disable unreferenced functions (kernel registrators) remove
+ -Wno-c++17-extensions
+ -flto
+ -faligned-allocation
+ -fsized-deallocation
+ # While it might be reasonable to compile host part of .cu sources with these optimizations enabled,
+ # nvcc passes these options down towards cicc which lacks x86_64 extensions support.
+ -msse2
+ -msse3
+ -mssse3
+ -msse4.1
+ -msse4.2
+ )
+
+ set(skipPrefixRegexp
+ "(-fsanitize=|-fsanitize-coverage=|-fsanitize-blacklist=|--system-header-prefix|(/|-)std(:|=)c\\+\\+).*"
+ )
+
+ string(FIND "${CMAKE_CUDA_HOST_COMPILER}" clang hostCompilerIsClangPos)
+ string(COMPARE NOTEQUAL ${hostCompilerIsClangPos} -1 isHostCompilerClang)
+
+
+ function(separate_arguments_with_special_symbols Output Src)
+ string(REPLACE ";" "$<SEMICOLON>" LocalOutput "${Src}")
+ separate_arguments(LocalOutput NATIVE_COMMAND ${LocalOutput})
+ set(${Output} ${LocalOutput} PARENT_SCOPE)
+ endfunction()
+
+ separate_arguments_with_special_symbols(Separated_CxxFlags "${CxxFlags}")
+
+ if (MSVC)
+ set(flagPrefixSymbol "/")
+ else()
+ set(flagPrefixSymbol "-")
+ endif()
+
+ set(localCudaCommonFlags "") # non host compiler options
+ set(localCudaCompilerOptions "")
+
+ while (Separated_CxxFlags)
+ list(POP_FRONT Separated_CxxFlags cxxFlag)
+ if ((cxxFlag IN_LIST skipList) OR (cxxFlag MATCHES ${skipPrefixRegexp}))
+ continue()
+ endif()
+ if ((cxxFlag STREQUAL -fopenmp=libomp) AND (NOT isHostCompilerClang))
+ list(APPEND localCudaCompilerOptions -fopenmp)
+ continue()
+ endif()
+ if ((NOT isHostCompilerClang) AND (cxxFlag MATCHES "^\-\-target=.*"))
+ continue()
+ endif()
+ if (cxxFlag MATCHES "^${flagPrefixSymbol}(D[^ ]+)=(.+)")
+ set(key ${CMAKE_MATCH_1})
+ quote_if_contains_spaces(safeValue "${CMAKE_MATCH_2}")
+ list(APPEND localCudaCommonFlags "-${key}=${safeValue}")
+ continue()
+ endif()
+ if (cxxFlag MATCHES "^${flagPrefixSymbol}([DI])(.*)")
+ set(key ${CMAKE_MATCH_1})
+ if (CMAKE_MATCH_2)
+ set(value ${CMAKE_MATCH_2})
+ set(sep "")
+ else()
+ list(POP_FRONT Separated_CxxFlags value)
+ set(sep " ")
+ endif()
+ quote_if_contains_spaces(safeValue "${value}")
+ list(APPEND localCudaCommonFlags "-${key}${sep}${safeValue}")
+ continue()
+ endif()
+ list(APPEND localCudaCompilerOptions ${cxxFlag})
+ endwhile()
+
+ if (isHostCompilerClang)
+ # nvcc concatenates the sources for clang, and clang reports unused
+ # things from .h files as if they they were defined in a .cpp file.
+ list(APPEND localCudaCommonFlags -Wno-unused-function -Wno-unused-parameter)
+ if (CMAKE_CXX_COMPILER_TARGET)
+ list(APPEND localCudaCompilerOptions "--target=${CMAKE_CXX_COMPILER_TARGET}")
+ endif()
+ endif()
+
+ if (CMAKE_SYSROOT)
+ list(APPEND localCudaCompilerOptions "--sysroot=${CMAKE_SYSROOT}")
+ endif()
+
+ list(JOIN localCudaCommonFlags " " joinedLocalCudaCommonFlags)
+ string(REPLACE "$<SEMICOLON>" ";" joinedLocalCudaCommonFlags "${joinedLocalCudaCommonFlags}")
+ list(JOIN localCudaCompilerOptions , joinedLocalCudaCompilerOptions)
+ set(${OutCudaFlags} "${joinedLocalCudaCommonFlags} --compiler-options ${joinedLocalCudaCompilerOptions}" PARENT_SCOPE)
+ endfunction()
+
+ get_cuda_flags_from_cxx_flags(CMAKE_CUDA_FLAGS "${CMAKE_CXX_FLAGS}")
+
+ string(APPEND CMAKE_CUDA_FLAGS
+ # Allow __host__, __device__ annotations in lambda declaration.
+ " --expt-extended-lambda"
+ # Allow host code to invoke __device__ constexpr functions and vice versa
+ " --expt-relaxed-constexpr"
+ )
+
+ set(NVCC_STD_VER 14)
+ if(MSVC)
+ set(NVCC_STD "/std:c++${NVCC_STD_VER}")
+ else()
+ set(NVCC_STD "-std=c++${NVCC_STD_VER}")
+ endif()
+ string(APPEND CMAKE_CUDA_FLAGS " --compiler-options ${NVCC_STD}")
+
+ string(APPEND CMAKE_CUDA_FLAGS " -DTHRUST_IGNORE_CUB_VERSION_CHECK")
+
+ if(MSVC)
+ # default CMake flags differ from our configuration
+ set(CMAKE_CUDA_FLAGS_DEBUG "-D_DEBUG --compiler-options /Z7,/Ob0,/Od")
+ set(CMAKE_CUDA_FLAGS_MINSIZEREL "-DNDEBUG --compiler-options /O1,/Ob1")
+ set(CMAKE_CUDA_FLAGS_RELEASE "-DNDEBUG --compiler-options /Ox,/Ob2,/Oi")
+ set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-DNDEBUG --compiler-options /Z7,/Ox,/Ob1")
+ endif()
+
+ # use versions from contrib, standard libraries from CUDA distibution are incompatible with MSVC and libcxx
+ set(CUDA_EXTRA_INCLUDE_DIRECTORIES
+ ${CMAKE_SOURCE_DIR}/contrib/libs/nvidia/thrust
+ ${CMAKE_SOURCE_DIR}/contrib/libs/nvidia/cub
+ )
+
+ find_package(CUDAToolkit REQUIRED)
+
+ if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL "11.2")
+ string(APPEND CMAKE_CUDA_FLAGS " --threads 0")
+ endif()
+
+ message(VERBOSE "CMAKE_CUDA_FLAGS = \"${CMAKE_CUDA_FLAGS}\"")
+
+ enable_language(CUDA)
+
+ function(target_cuda_flags Tgt)
+ set_property(TARGET ${Tgt} APPEND PROPERTY
+ CUDA_FLAGS ${ARGN}
+ )
+ endfunction()
+
+ function(target_cuda_cflags Tgt)
+ if (NOT ("${ARGN}" STREQUAL ""))
+ string(JOIN "," OPTIONS ${ARGN})
+ set_property(TARGET ${Tgt} APPEND PROPERTY
+ CUDA_FLAGS --compiler-options ${OPTIONS}
+ )
+ endif()
+ endfunction()
+
+ function(target_cuda_sources Tgt Scope)
+ # add include directories on per-CMakeLists file level because some non-CUDA source files may want to include calls to CUDA libs
+ include_directories(${CUDA_EXTRA_INCLUDE_DIRECTORIES})
+
+ set_source_files_properties(${ARGN} PROPERTIES
+ COMPILE_OPTIONS "$<JOIN:$<TARGET_GENEX_EVAL:${Tgt},$<TARGET_PROPERTY:${Tgt},CUDA_FLAGS>>,;>"
+ )
+ target_sources(${Tgt} ${Scope} ${ARGN})
+ endfunction()
+
+endif()
diff --git a/cmake/cython.cmake b/cmake/cython.cmake
new file mode 100644
index 0000000000..d239c2dc58
--- /dev/null
+++ b/cmake/cython.cmake
@@ -0,0 +1,41 @@
+function(target_cython_include_directories Tgt)
+ set_property(TARGET ${Tgt} APPEND PROPERTY
+ CYTHON_INCLUDE_DIRS ${ARGN}
+ )
+endfunction()
+
+function(target_cython_options Tgt)
+ set_property(TARGET ${Tgt} APPEND PROPERTY
+ CYTHON_OPTIONS ${ARGN}
+ )
+endfunction()
+
+macro(set_python_type_for_cython Tgt Type)
+ if (${Type} STREQUAL PY3)
+ find_package(Python3 REQUIRED COMPONENTS Interpreter)
+ set_property(TARGET ${Tgt} APPEND PROPERTY
+ CYTHON_PYTHON_INTERPRETER ${Python3_EXECUTABLE}
+ )
+ else()
+ find_package(Python2 REQUIRED COMPONENTS Interpreter)
+ set_property(TARGET ${Tgt} APPEND PROPERTY
+ CYTHON_PYTHON_INTERPRETER ${Python2_EXECUTABLE}
+ )
+ endif()
+endmacro()
+
+function(target_cython_sources Tgt Scope)
+ foreach(Input ${ARGN})
+ get_filename_component(OutputBase ${Input} NAME)
+ set(CppCythonOutput ${CMAKE_CURRENT_BINARY_DIR}/${OutputBase}.cpp)
+ add_custom_command(
+ OUTPUT ${CppCythonOutput}
+ COMMAND $<TARGET_GENEX_EVAL:${Tgt},$<TARGET_PROPERTY:${Tgt},CYTHON_PYTHON_INTERPRETER>> ${CMAKE_SOURCE_DIR}/contrib/tools/cython/cython.py ${Input} -o ${CppCythonOutput}
+ "$<JOIN:$<TARGET_GENEX_EVAL:${Tgt},$<TARGET_PROPERTY:${Tgt},CYTHON_OPTIONS>>,$<SEMICOLON>>"
+ "-I$<JOIN:$<TARGET_GENEX_EVAL:${Tgt},$<TARGET_PROPERTY:${Tgt},CYTHON_INCLUDE_DIRS>>,$<SEMICOLON>-I>"
+ COMMAND_EXPAND_LISTS
+ DEPENDS ${OUTPUT_INCLUDES}
+ )
+ target_sources(${Tgt} ${Scope} ${CppCythonOutput})
+ endforeach()
+endfunction()
diff --git a/cmake/fat_object.cmake b/cmake/fat_object.cmake
new file mode 100644
index 0000000000..ae81534e81
--- /dev/null
+++ b/cmake/fat_object.cmake
@@ -0,0 +1,8 @@
+function(add_fat_object Target)
+ add_executable(${Target} EXCLUDE_FROM_ALL)
+ set_property(TARGET ${Target} PROPERTY EchoString "Partial linking ${FAT_OBJECT_PREFIX}${Target}${FAT_OBJECT_SUFFIX}")
+ set_property(TARGET ${Target} PROPERTY SUFFIX ${FAT_OBJECT_SUFFIX})
+ set_property(TARGET ${Target} PROPERTY PREFIX ${FAT_OBJECT_PREFIX})
+ set_property(TARGET ${Target} PROPERTY POSITION_INDEPENDENT_CODE Off)
+ target_link_options(${Target} PRIVATE -Wl,-r -nodefaultlibs -nostartfiles)
+endfunction() \ No newline at end of file
diff --git a/cmake/global_vars.cmake b/cmake/global_vars.cmake
deleted file mode 100644
index ebe4053b03..0000000000
--- a/cmake/global_vars.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-
-# This file was generated by the build system used internally in the Yandex monorepo.
-# Only simple modifications are allowed (adding source-files to targets, adding simple properties
-# like target_include_directories). These modifications will be ported to original
-# ya.make files by maintainers. Any complex modifications which can't be ported back to the
-# original buildsystem will not be accepted.
-
-
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA)
- set(YASM_FLAGS -f elf64 -D UNIX -D _x86_64_ -D_YASM_ -g dwarf2)
- set(BISON_FLAGS -v)
- set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs)
- set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/)
-endif()
-
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT HAVE_CUDA)
- set(BISON_FLAGS -v)
- set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs)
- set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/)
-endif()
-
-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
- set(YASM_FLAGS -f macho64 -D DARWIN -D UNIX -D _x86_64_ -D_YASM_)
- set(BISON_FLAGS -v)
- set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs)
- set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/)
-endif()
-
-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
- set(BISON_FLAGS -v)
- set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs)
- set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/)
-endif()
-
-if(WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA)
- set(YASM_FLAGS -f win64 -D WIN64 -D _x86_64_ -D_YASM_)
- set(BISON_FLAGS -v)
- set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs)
- set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/)
-endif()
-
diff --git a/cmake/recursive_library.cmake b/cmake/recursive_library.cmake
new file mode 100644
index 0000000000..f3596edcbc
--- /dev/null
+++ b/cmake/recursive_library.cmake
@@ -0,0 +1,50 @@
+function(add_recursive_library Target)
+ if (${CMAKE_VERSION} VERSION_LESS "3.21.0")
+ message(FATAL_ERROR "add_recursive_library requires at least cmake 3.21.0 (because it uses CXX_LINKER_LAUNCHER)")
+ endif()
+
+ if (CMAKE_GENERATOR MATCHES "Visual.Studio.*")
+ message(FATAL_ERROR "add_recursive_library is incompatible with Visual Studio generators")
+ endif()
+
+ find_package(Python3 REQUIRED)
+
+ # this is not really an executable but we will use it to make CMake collect all dependencies to pass to the custom linking command (because there's no proper way to do it otherwise)
+ add_executable(${Target} EXCLUDE_FROM_ALL)
+ if (NOT (DEFINED CMAKE_POSITION_INDEPENDENT_CODE))
+ # default should be the same as for usual static libraries - https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html
+ set_property(TARGET ${Target} PROPERTY POSITION_INDEPENDENT_CODE Off)
+ endif()
+
+ set_property(TARGET ${Target} PROPERTY PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
+ set_property(TARGET ${Target} PROPERTY SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
+
+ # the result will consist of two files at most (if there are no input files of particular type the resulting output files won't be created):
+ # ${PREFIX}${Target}${SUFFIX} - for objects not requiring global initialization
+ # ${PREFIX}${Target}${GLOBAL_PART_SUFFIX}${SUFFIX} - for objects requiring global initialization
+ set(GLOBAL_PART_SUFFIX ".global")
+
+ if (MSVC)
+ # if this is not disabled CMake generates additional call to mt.exe after the linking command, manifests are needed only for real executables and dlls
+ target_link_options(${Target} PRIVATE "/MANIFEST:NO")
+ endif()
+ string(CONCAT CXX_LINKER_LAUNCHER_CMD "${Python3_EXECUTABLE}"
+ ";${CMAKE_SOURCE_DIR}/build/scripts/create_recursive_library_for_cmake.py"
+ ";--cmake-binary-dir;${CMAKE_BINARY_DIR}"
+ ";--cmake-ar;${CMAKE_AR}"
+ ";--cmake-ranlib;${CMAKE_RANLIB}"
+ ";--cmake-host-system-name;${CMAKE_HOST_SYSTEM_NAME}"
+ ";--global-part-suffix;${GLOBAL_PART_SUFFIX}"
+ )
+ if (CMAKE_CXX_STANDARD_LIBRARIES)
+ # because they have to be excluded from input
+ string(APPEND CXX_LINKER_LAUNCHER_CMD ";--cmake-cxx-standard-libraries;${CMAKE_CXX_STANDARD_LIBRARIES}")
+ endif()
+ string(APPEND CXX_LINKER_LAUNCHER_CMD ";--linking-cmdline") # this must be the last argument
+
+ set_property(TARGET ${Target} PROPERTY CXX_LINKER_LAUNCHER ${CXX_LINKER_LAUNCHER_CMD})
+ set_property(TARGET ${Target} PROPERTY LINK_DEPENDS
+ "${CMAKE_SOURCE_DIR}/build/scripts/create_recursive_library_for_cmake.py"
+ ";${CMAKE_SOURCE_DIR}/build/scripts/link_lib.py"
+ )
+endfunction()
diff --git a/cmake/swig.cmake b/cmake/swig.cmake
new file mode 100644
index 0000000000..d4bb2a2536
--- /dev/null
+++ b/cmake/swig.cmake
@@ -0,0 +1,51 @@
+set(SWIG_EXECUTABLE ${CMAKE_BINARY_DIR}/bin/swig${CMAKE_EXECUTABLE_SUFFIX})
+set(SWIG_SOURCE_FILE_EXTENSIONS .swg)
+
+function(add_swig_jni_library TgtName)
+ set(opts "")
+ set(oneval_args GEN_JAVA_FILES_LIST)
+ set(multival_args SOURCES)
+ cmake_parse_arguments(SWIG_JNI_LIB
+ "${opts}"
+ "${oneval_args}"
+ "${multival_args}"
+ ${ARGN}
+ )
+
+ set_property(SOURCE
+ ${SWIG_JNI_LIB_SOURCES}
+ PROPERTY
+ CPLUSPLUS On
+ )
+
+ file(RELATIVE_PATH PathInProject ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+ string(REPLACE "/" "." JVMPackageName ${PathInProject})
+ string(REPLACE "-" "_" JVMPackageName ${JVMPackageName})
+ string(PREPEND JVMPackageName "ru.yandex.")
+
+ string(REPLACE "." "/" OutDir ${JVMPackageName})
+ string(CONCAT OutDirAbs ${CMAKE_CURRENT_BINARY_DIR} "/java/" ${OutDir})
+
+ swig_add_library(${TgtName}
+ TYPE SHARED
+ LANGUAGE java
+ OUTPUT_DIR ${OutDirAbs}
+ OUTFILE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cpp
+ SOURCES
+ ${SWIG_JNI_LIB_SOURCES}
+ )
+
+ if(APPLE)
+ # for some legacy reason swig_add_library uses '.jnilib' suffix which has been replaced with '.dylib' since JDK7
+ set_target_properties(${TgtName} PROPERTIES SUFFIX ".dylib")
+ endif()
+
+ set_property(TARGET ${TgtName} PROPERTY SWIG_COMPILE_OPTIONS -package ${JVMPackageName})
+
+ add_custom_command(TARGET
+ ${TgtName}
+ POST_BUILD COMMAND
+ ${CMAKE_COMMAND} -DJAVA_SRC_DIR=${OutDirAbs} -DJAVA_LST=${CMAKE_CURRENT_BINARY_DIR}/swig_gen_java.lst -P ${CMAKE_SOURCE_DIR}/build/scripts/gather_swig_java.cmake
+ BYPRODUCTS ${SWIG_JNI_LIB_GEN_JAVA_FILES_LIST}
+ )
+endfunction()
diff --git a/contrib/go/_std_1.21/src/crypto/dsa/dsa.go b/contrib/go/_std_1.21/src/crypto/dsa/dsa.go
index 29dab1c9fc..a83359996d 100644
--- a/contrib/go/_std_1.21/src/crypto/dsa/dsa.go
+++ b/contrib/go/_std_1.21/src/crypto/dsa/dsa.go
@@ -14,10 +14,11 @@
package dsa
import (
- "crypto/internal/randutil"
"errors"
"io"
"math/big"
+
+ "crypto/internal/randutil"
)
// Parameters represents the domain parameters for a key. These parameters can
diff --git a/contrib/go/_std_1.21/src/crypto/x509/x509.go b/contrib/go/_std_1.21/src/crypto/x509/x509.go
index af932b7577..9d80b1d8ba 100644
--- a/contrib/go/_std_1.21/src/crypto/x509/x509.go
+++ b/contrib/go/_std_1.21/src/crypto/x509/x509.go
@@ -29,11 +29,6 @@ import (
"crypto/elliptic"
"crypto/rsa"
"crypto/sha1"
- // Explicitly import these for their crypto.RegisterHash init side-effects.
- // Keep these as blank imports, even if they're imported above.
- _ "crypto/sha1"
- _ "crypto/sha256"
- _ "crypto/sha512"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/pem"
@@ -48,6 +43,12 @@ import (
"time"
"unicode"
+ // Explicitly import these for their crypto.RegisterHash init side-effects.
+ // Keep these as blank imports, even if they're imported above.
+ _ "crypto/sha1"
+ _ "crypto/sha256"
+ _ "crypto/sha512"
+
"golang.org/x/crypto/cryptobyte"
cryptobyte_asn1 "golang.org/x/crypto/cryptobyte/asn1"
)
diff --git a/contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go b/contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go
index 7563d9f34f..c96427486e 100644
--- a/contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go
+++ b/contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go
@@ -20,7 +20,6 @@ import (
"strings"
"sync"
_ "unsafe" // for go:linkname
-
)
// An Importer provides the context for importing packages from source code.
diff --git a/contrib/go/_std_1.21/src/internal/buildcfg/exp.go b/contrib/go/_std_1.21/src/internal/buildcfg/exp.go
index 34fad035e9..513070c8af 100644
--- a/contrib/go/_std_1.21/src/internal/buildcfg/exp.go
+++ b/contrib/go/_std_1.21/src/internal/buildcfg/exp.go
@@ -6,9 +6,10 @@ package buildcfg
import (
"fmt"
- "internal/goexperiment"
"reflect"
"strings"
+
+ "internal/goexperiment"
)
// ExperimentFlags represents a set of GOEXPERIMENT flags relative to a baseline
diff --git a/contrib/go/_std_1.21/src/internal/bytealg/compare_native.go b/contrib/go/_std_1.21/src/internal/bytealg/compare_native.go
index e016430075..34964e281c 100644
--- a/contrib/go/_std_1.21/src/internal/bytealg/compare_native.go
+++ b/contrib/go/_std_1.21/src/internal/bytealg/compare_native.go
@@ -6,8 +6,7 @@
package bytealg
-import _ "unsafe"
-// For go:linkname
+import _ "unsafe" // For go:linkname
//go:noescape
func Compare(a, b []byte) int
diff --git a/contrib/go/_std_1.21/src/internal/fuzz/trace.go b/contrib/go/_std_1.21/src/internal/fuzz/trace.go
index b471914850..a15c370063 100644
--- a/contrib/go/_std_1.21/src/internal/fuzz/trace.go
+++ b/contrib/go/_std_1.21/src/internal/fuzz/trace.go
@@ -6,8 +6,7 @@
package fuzz
-import _ "unsafe"
-// for go:linkname
+import _ "unsafe" // for go:linkname
//go:linkname libfuzzerTraceCmp1 runtime.libfuzzerTraceCmp1
//go:linkname libfuzzerTraceCmp2 runtime.libfuzzerTraceCmp2
diff --git a/contrib/go/_std_1.21/src/internal/godebug/godebug.go b/contrib/go/_std_1.21/src/internal/godebug/godebug.go
index 1265ed7e1e..36bfeaccc4 100644
--- a/contrib/go/_std_1.21/src/internal/godebug/godebug.go
+++ b/contrib/go/_std_1.21/src/internal/godebug/godebug.go
@@ -40,7 +40,6 @@ import (
"sync/atomic"
"unsafe"
_ "unsafe" // go:linkname
-
)
// A Setting is a single setting in the $GODEBUG environment variable.
diff --git a/contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go b/contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go
index 81cfb29079..3ae2dc8448 100644
--- a/contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go
+++ b/contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go
@@ -7,7 +7,6 @@ package poll
import (
"syscall"
_ "unsafe" // for go:linkname
-
)
// OpenDir returns a pointer to a DIR structure suitable for
diff --git a/contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go b/contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go
index c80d0086f2..b51535ecf2 100644
--- a/contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go
+++ b/contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go
@@ -12,7 +12,6 @@ import (
"syscall"
"time"
_ "unsafe" // for go:linkname
-
)
// runtimeNano returns the current value of the runtime clock in nanoseconds.
diff --git a/contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go b/contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go
index 1b35bd9052..0a60473b3e 100644
--- a/contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go
+++ b/contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go
@@ -9,7 +9,6 @@ package poll
import (
"syscall"
_ "unsafe" // for go:linkname
-
)
//go:linkname writev syscall.writev
diff --git a/contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go b/contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go
index 4eeb7717ed..93d0cf4443 100644
--- a/contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go
+++ b/contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go
@@ -9,7 +9,6 @@ package unix
import (
"syscall"
_ "unsafe" // for linkname
-
)
func Unlinkat(dirfd int, path string, flags int) error {
diff --git a/contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go b/contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go
index 8422637dac..6f9e124394 100644
--- a/contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go
+++ b/contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go
@@ -9,7 +9,6 @@ package unix
import (
"syscall"
_ "unsafe" // for go:linkname
-
)
// Implemented in the runtime package.
diff --git a/contrib/go/_std_1.21/src/math/rand/rand.go b/contrib/go/_std_1.21/src/math/rand/rand.go
index 1a6a705be1..cc1f95c88d 100644
--- a/contrib/go/_std_1.21/src/math/rand/rand.go
+++ b/contrib/go/_std_1.21/src/math/rand/rand.go
@@ -22,7 +22,6 @@ import (
"sync"
"sync/atomic"
_ "unsafe" // for go:linkname
-
)
// A Source represents a source of uniformly-distributed
diff --git a/contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go b/contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go
index e6be490c8c..25aa6e2092 100644
--- a/contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go
+++ b/contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go
@@ -6,7 +6,6 @@ package multipart
import (
"net/textproto"
_ "unsafe" // for go:linkname
-
)
// readMIMEHeader is defined in package net/textproto.
diff --git a/contrib/go/_std_1.21/src/net/netip/netip.go b/contrib/go/_std_1.21/src/net/netip/netip.go
index 890b94be6c..a44b094955 100644
--- a/contrib/go/_std_1.21/src/net/netip/netip.go
+++ b/contrib/go/_std_1.21/src/net/netip/netip.go
@@ -13,11 +13,12 @@ package netip
import (
"errors"
+ "math"
+ "strconv"
+
"internal/bytealg"
"internal/intern"
"internal/itoa"
- "math"
- "strconv"
)
// Sizes: (64-bit)
diff --git a/contrib/go/_std_1.21/src/os/file_unix.go b/contrib/go/_std_1.21/src/os/file_unix.go
index fc711c1edd..533a48404b 100644
--- a/contrib/go/_std_1.21/src/os/file_unix.go
+++ b/contrib/go/_std_1.21/src/os/file_unix.go
@@ -13,7 +13,6 @@ import (
"runtime"
"syscall"
_ "unsafe" // for go:linkname
-
)
const _UTIME_OMIT = unix.UTIME_OMIT
diff --git a/contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go b/contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go
index c8f25118c6..dae31a8fcd 100644
--- a/contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go
+++ b/contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go
@@ -6,8 +6,7 @@
package cgo
-import _ "unsafe"
-// for go:linkname
+import _ "unsafe" // for go:linkname
// Calls the traceback function passed to SetCgoTraceback.
diff --git a/contrib/go/_std_1.21/src/runtime/cgo/iscgo.go b/contrib/go/_std_1.21/src/runtime/cgo/iscgo.go
index 91159fe3dc..e12d0f4b95 100644
--- a/contrib/go/_std_1.21/src/runtime/cgo/iscgo.go
+++ b/contrib/go/_std_1.21/src/runtime/cgo/iscgo.go
@@ -11,8 +11,7 @@
package cgo
-import _ "unsafe"
-// for go:linkname
+import _ "unsafe" // for go:linkname
//go:linkname _iscgo runtime.iscgo
var _iscgo bool = true
diff --git a/contrib/go/_std_1.21/src/runtime/cgo/setenv.go b/contrib/go/_std_1.21/src/runtime/cgo/setenv.go
index 12f0a0014f..2247cb2b59 100644
--- a/contrib/go/_std_1.21/src/runtime/cgo/setenv.go
+++ b/contrib/go/_std_1.21/src/runtime/cgo/setenv.go
@@ -6,8 +6,7 @@
package cgo
-import _ "unsafe"
-// for go:linkname
+import _ "unsafe" // for go:linkname
//go:cgo_import_static x_cgo_setenv
//go:linkname x_cgo_setenv x_cgo_setenv
diff --git a/contrib/go/_std_1.21/src/runtime/mgcpacer.go b/contrib/go/_std_1.21/src/runtime/mgcpacer.go
index cd56dc427c..32e19f96e1 100644
--- a/contrib/go/_std_1.21/src/runtime/mgcpacer.go
+++ b/contrib/go/_std_1.21/src/runtime/mgcpacer.go
@@ -9,7 +9,6 @@ import (
"internal/goexperiment"
"runtime/internal/atomic"
_ "unsafe" // for go:linkname
-
)
const (
diff --git a/contrib/go/_std_1.21/src/runtime/rdebug.go b/contrib/go/_std_1.21/src/runtime/rdebug.go
index c1cf2f4f81..7ecb2a52ee 100644
--- a/contrib/go/_std_1.21/src/runtime/rdebug.go
+++ b/contrib/go/_std_1.21/src/runtime/rdebug.go
@@ -4,8 +4,7 @@
package runtime
-import _ "unsafe"
-// for go:linkname
+import _ "unsafe" // for go:linkname
//go:linkname setMaxStack runtime/debug.setMaxStack
func setMaxStack(in int) (out int) {
diff --git a/contrib/go/_std_1.21/src/runtime/runtime_boring.go b/contrib/go/_std_1.21/src/runtime/runtime_boring.go
index 1ee91d667e..5a98b20253 100644
--- a/contrib/go/_std_1.21/src/runtime/runtime_boring.go
+++ b/contrib/go/_std_1.21/src/runtime/runtime_boring.go
@@ -4,8 +4,7 @@
package runtime
-import _ "unsafe"
-// for go:linkname
+import _ "unsafe" // for go:linkname
//go:linkname boring_runtime_arg0 crypto/internal/boring.runtime_arg0
func boring_runtime_arg0() string {
diff --git a/contrib/go/_std_1.21/src/runtime/sigqueue.go b/contrib/go/_std_1.21/src/runtime/sigqueue.go
index 886536a1cc..51e424d55b 100644
--- a/contrib/go/_std_1.21/src/runtime/sigqueue.go
+++ b/contrib/go/_std_1.21/src/runtime/sigqueue.go
@@ -35,7 +35,6 @@ package runtime
import (
"runtime/internal/atomic"
_ "unsafe" // for go:linkname
-
)
// sig handles communication between the signal handler and os/signal.
diff --git a/contrib/go/_std_1.21/src/runtime/timestub.go b/contrib/go/_std_1.21/src/runtime/timestub.go
index f63bac808a..1d2926b43d 100644
--- a/contrib/go/_std_1.21/src/runtime/timestub.go
+++ b/contrib/go/_std_1.21/src/runtime/timestub.go
@@ -9,8 +9,7 @@
package runtime
-import _ "unsafe"
-// for go:linkname
+import _ "unsafe" // for go:linkname
//go:linkname time_now time.now
func time_now() (sec int64, nsec int32, mono int64) {
diff --git a/contrib/go/_std_1.21/src/time/time.go b/contrib/go/_std_1.21/src/time/time.go
index 21ced99c0a..e8aac5999a 100644
--- a/contrib/go/_std_1.21/src/time/time.go
+++ b/contrib/go/_std_1.21/src/time/time.go
@@ -81,7 +81,6 @@ package time
import (
"errors"
_ "unsafe" // for go:linkname
-
)
// A Time represents an instant in time with nanosecond precision.
diff --git a/contrib/go/_std_1.21/src/time/tzdata/tzdata.go b/contrib/go/_std_1.21/src/time/tzdata/tzdata.go
index 43dd85c8cc..95c759b655 100644
--- a/contrib/go/_std_1.21/src/time/tzdata/tzdata.go
+++ b/contrib/go/_std_1.21/src/time/tzdata/tzdata.go
@@ -24,7 +24,6 @@ import (
"errors"
"syscall"
_ "unsafe" // for go:linkname
-
)
// registerLoadFromEmbeddedTZData is defined in package time.
diff --git a/contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl b/contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl
index 5f5991f4eb..8ad71d6474 100644
--- a/contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl
+++ b/contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl
@@ -161,7 +161,6 @@ TreeParser<ImplTraits>::getMissingSymbol( IntStreamType* istream, ExceptionBaseT
TreeTypePtr current;
CommonTokenType* token;
StringType text;
- ANTLR_INT32 i;
// Dereference the standard pointers
//
@@ -170,12 +169,10 @@ TreeParser<ImplTraits>::getMissingSymbol( IntStreamType* istream, ExceptionBaseT
// Create a new empty node, by stealing the current one, or the previous one if the current one is EOF
//
current = tns->LT(1);
- i = -1;
if (current == tns->get_EOF_NODE_p())
{
current = tns->LT(-1);
- i--;
}
node = current->dupNode();
diff --git a/contrib/libs/curl/bin/ya.make b/contrib/libs/curl/bin/ya.make
index a6c461a7f9..243fc1ab22 100644
--- a/contrib/libs/curl/bin/ya.make
+++ b/contrib/libs/curl/bin/ya.make
@@ -11,8 +11,6 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-WITHOUT_LICENSE_TEXTS()
-
PEERDIR(
contrib/libs/c-ares
contrib/libs/curl
diff --git a/contrib/libs/curl/src/tool_main.c b/contrib/libs/curl/src/tool_main.c
index 84bc679b53..45cc7e0809 100644
--- a/contrib/libs/curl/src/tool_main.c
+++ b/contrib/libs/curl/src/tool_main.c
@@ -38,7 +38,7 @@
#endif
#ifdef USE_NSS
-#include <nspr.h>
+#error #include <nspr.h>
#error #include <plarenas.h>
#endif
diff --git a/contrib/libs/cxxsupp/libsan/ya.make b/contrib/libs/cxxsupp/libsan/ya.make
index 2fb16630be..d8083d39f6 100644
--- a/contrib/libs/cxxsupp/libsan/ya.make
+++ b/contrib/libs/cxxsupp/libsan/ya.make
@@ -12,7 +12,7 @@ NO_SANITIZE_COVERAGE()
OWNER(somov)
-PYTHON(
+RUN_PYTHON2(
generate_symbolizer.py ${CXX_COMPILER}
STDOUT symbolizer.c
)
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index b70d38e2c2..28fc8267e3 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hypothesis
-Version: 6.92.1
+Version: 6.92.2
Summary: A library for property-based testing
Home-page: https://hypothesis.works
Author: David R. MacIver and Zac Hatfield-Dodds
diff --git a/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt b/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
index 98deba4045..589b768abd 100644
--- a/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
+++ b/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
@@ -1,4 +1,4 @@
-# Version 2023112500, Last Updated Sat Nov 25 07:07:01 2023 UTC
+# Version 2023122300, Last Updated Sat Dec 23 07:07:01 2023 UTC
AAA
AARP
ABB
@@ -1016,7 +1016,6 @@ SB
SBI
SBS
SC
-SCA
SCB
SCHAEFFLER
SCHMIDT
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 937332138d..968da9a95e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/version.py
+++ b/contrib/python/hypothesis/py3/hypothesis/version.py
@@ -8,5 +8,5 @@
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
-__version_info__ = (6, 92, 1)
+__version_info__ = (6, 92, 2)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 80e21c22c2..d92a4bf7d3 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.92.1)
+VERSION(6.92.2)
LICENSE(MPL-2.0)
diff --git a/contrib/tools/bison/bison/data/yacc.c b/contrib/tools/bison/bison/data/yacc.c
index c18a9350cf..9fa369c8b2 100644
--- a/contrib/tools/bison/bison/data/yacc.c
+++ b/contrib/tools/bison/bison/data/yacc.c
@@ -198,7 +198,7 @@ int yynerrs;]])])
# between calls to yypush_parse.
m4_define([b4_declare_parser_state_variables], [b4_pure_if([[
/* Number of syntax errors so far. */
- int yynerrs;
+ __attribute__((unused)) int yynerrs;
]])[
int yystate;
/* Number of tokens to shift before error messages enabled. */
diff --git a/library/cpp/http/server/http_ut.cpp b/library/cpp/http/server/http_ut.cpp
index 191a6428ef..0fc44fa598 100644
--- a/library/cpp/http/server/http_ut.cpp
+++ b/library/cpp/http/server/http_ut.cpp
@@ -339,9 +339,6 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
}
Y_UNIT_TEST(TestReusePortEnabled) {
- if (!IsReusePortAvailable()) {
- return; // skip test
- }
TString res = TestData();
TPortManager pm;
const ui16 port = pm.GetPort();
diff --git a/library/cpp/lwtrace/protos/lwtrace.proto b/library/cpp/lwtrace/protos/lwtrace.proto
index 4702f56c0a..0051095719 100644
--- a/library/cpp/lwtrace/protos/lwtrace.proto
+++ b/library/cpp/lwtrace/protos/lwtrace.proto
@@ -5,7 +5,7 @@ syntax = "proto3";
package NLWTrace;
-option go_package = "github.com/ydb-platform/ydb/library/cpp/lwtrace/protos";
+option go_package = "a.yandex-team.ru/library/cpp/lwtrace/protos";
message TProbeDesc {
string Name = 1; // Use either name+provider
diff --git a/library/cpp/unified_agent_client/proto/unified_agent.proto b/library/cpp/unified_agent_client/proto/unified_agent.proto
index 9a507afa06..68efe35747 100644
--- a/library/cpp/unified_agent_client/proto/unified_agent.proto
+++ b/library/cpp/unified_agent_client/proto/unified_agent.proto
@@ -4,7 +4,7 @@ import "google/protobuf/descriptor.proto";
package NUnifiedAgentProto;
option java_package = "com.yandex.unified_agent";
-option go_package = "github.com/ydb-platform/ydb/library/cpp/unified_agent_client/proto;unifiedagent";
+option go_package = "a.yandex-team.ru/library/cpp/unified_agent_client/proto;unifiedagent";
extend google.protobuf.FileOptions {
bool GenerateYaStyle = 66777;
diff --git a/library/cpp/yt/misc/strong_typedef-inl.h b/library/cpp/yt/misc/strong_typedef-inl.h
index 0a8a9751f0..09b814b62c 100644
--- a/library/cpp/yt/misc/strong_typedef-inl.h
+++ b/library/cpp/yt/misc/strong_typedef-inl.h
@@ -167,6 +167,14 @@ struct hash<NYT::TStrongTypedef<T, TTag>>
////////////////////////////////////////////////////////////////////////////////
+template <class T, class TTag>
+ requires std::numeric_limits<T>::is_specialized
+class numeric_limits<NYT::TStrongTypedef<T, TTag>>
+ : public numeric_limits<T>
+{ };
+
+////////////////////////////////////////////////////////////////////////////////
+
} // namespace std
////////////////////////////////////////////////////////////////////////////////
diff --git a/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp b/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp
new file mode 100644
index 0000000000..bc9321bb3c
--- /dev/null
+++ b/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp
@@ -0,0 +1,64 @@
+#include <library/cpp/yt/misc/strong_typedef.h>
+
+#include <limits>
+
+namespace NYT {
+namespace {
+
+////////////////////////////////////////////////////////////////////////////////
+
+YT_DEFINE_STRONG_TYPEDEF(TMyInt1, int);
+YT_DEFINE_STRONG_TYPEDEF(TMyInt2, TMyInt1);
+
+static_assert(std::numeric_limits<TMyInt1>::is_specialized);
+static_assert(std::numeric_limits<TMyInt2>::is_specialized);
+
+#define XX(name) \
+ static_assert(std::numeric_limits<TMyInt1>::name == std::numeric_limits<int>::name); \
+ static_assert(std::numeric_limits<TMyInt2>::name == std::numeric_limits<int>::name);
+
+XX(is_signed)
+XX(digits)
+XX(digits10)
+XX(max_digits10)
+XX(is_integer)
+XX(is_exact)
+XX(radix)
+XX(min_exponent)
+XX(min_exponent10)
+XX(max_exponent)
+XX(max_exponent10)
+XX(has_infinity)
+XX(has_quiet_NaN)
+XX(has_signaling_NaN)
+XX(has_denorm)
+XX(has_denorm_loss)
+XX(is_iec559)
+XX(is_bounded)
+XX(is_modulo)
+XX(traps)
+XX(tinyness_before)
+XX(round_style)
+
+#undef XX
+
+#define XX(name) \
+ static_assert(std::numeric_limits<TMyInt1>::name() == std::numeric_limits<int>::name()); \
+ static_assert(std::numeric_limits<TMyInt2>::name() == std::numeric_limits<int>::name());
+
+XX(min)
+XX(max)
+XX(lowest)
+XX(epsilon)
+XX(round_error)
+XX(infinity)
+XX(quiet_NaN)
+XX(signaling_NaN)
+XX(denorm_min)
+
+#undef XX
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace
+} // namespace NYT
diff --git a/library/cpp/yt/misc/unittests/ya.make b/library/cpp/yt/misc/unittests/ya.make
index bc985812ed..611edd7217 100644
--- a/library/cpp/yt/misc/unittests/ya.make
+++ b/library/cpp/yt/misc/unittests/ya.make
@@ -6,6 +6,7 @@ SRCS(
enum_ut.cpp
guid_ut.cpp
preprocessor_ut.cpp
+ strong_typedef_ut.cpp
)
PEERDIR(
diff --git a/library/go/core/buildinfo/buildinfo.go b/library/go/core/buildinfo/buildinfo.go
index fe6b8286cb..88b7d52c9e 100644
--- a/library/go/core/buildinfo/buildinfo.go
+++ b/library/go/core/buildinfo/buildinfo.go
@@ -14,7 +14,7 @@ type BuildInfo struct {
//
// Other info:
// Build by: prime
- // Top src dir: /home/prime/Code/go/src/github.com/ydb-platform/ydb
+ // Top src dir: /home/prime/Code/go/src/a.yandex-team.ru
// Top build dir: /home/prime/.ya/build/build_root/qbh0/000002
// Hostname: 77.88.18.146-red.dhcp.yndx.net
// Host information:
diff --git a/library/go/core/buildinfo/test/main.go b/library/go/core/buildinfo/test/main.go
index 7b13900295..a17ac12749 100644
--- a/library/go/core/buildinfo/test/main.go
+++ b/library/go/core/buildinfo/test/main.go
@@ -3,7 +3,7 @@ package main
import (
"fmt"
- "github.com/ydb-platform/ydb/library/go/core/buildinfo"
+ "a.yandex-team.ru/library/go/core/buildinfo"
)
func main() {
diff --git a/library/go/test/yatest/env.go b/library/go/test/yatest/env.go
index fd2bacbc26..d655e4c6da 100644
--- a/library/go/test/yatest/env.go
+++ b/library/go/test/yatest/env.go
@@ -149,7 +149,7 @@ func CxxCompilerPath() string {
// Warn: if you are using build with system python (-DUSE_SYSTEM_PYTHON=X) beware that some python bundles
// are built in a stripped-down form that is needed for building, not running tests.
// See comments in the file below to find out which version of python is compatible with tests.
-// https://github.com/ydb-platform/ydb/arc/trunk/arcadia/build/platform/python/resources.inc
+// https://a.yandex-team.ru/arc/trunk/arcadia/build/platform/python/resources.inc
func PythonBinPath() string {
lazyInit()
verifyContext()
diff --git a/library/recipes/docker_compose/lib/__init__.py b/library/recipes/docker_compose/lib/__init__.py
index cc20cae5f8..652807ea84 100644
--- a/library/recipes/docker_compose/lib/__init__.py
+++ b/library/recipes/docker_compose/lib/__init__.py
@@ -9,8 +9,8 @@ import logging
import argparse
import yatest.common
-from test import const
from six.moves import input
+import build.plugins.lib.test_const as const
import library.python.fs as fs
import library.python.testing.recipe
diff --git a/library/recipes/docker_compose/lib/ya.make b/library/recipes/docker_compose/lib/ya.make
index c71dbf24d1..9472c63fd4 100644
--- a/library/recipes/docker_compose/lib/ya.make
+++ b/library/recipes/docker_compose/lib/ya.make
@@ -5,8 +5,8 @@ PY_SRCS(
)
PEERDIR(
+ build/plugins/lib/test_const
contrib/python/PyYAML
- devtools/ya/test/const
library/python/fs
library/python/testing/recipe
)
diff --git a/util/network/socket.cpp b/util/network/socket.cpp
index f6b1132222..eaaf0c9cb6 100644
--- a/util/network/socket.cpp
+++ b/util/network/socket.cpp
@@ -307,17 +307,13 @@ void SetInputBuffer(SOCKET s, unsigned value) {
CheckedSetSockOpt(s, SOL_SOCKET, SO_RCVBUF, value, "input buffer");
}
-#if defined(_linux_) && !defined(SO_REUSEPORT)
- #define SO_REUSEPORT 15
-#endif
-
void SetReusePort(SOCKET s, bool value) {
-#if defined(SO_REUSEPORT)
+#if defined(_unix_)
CheckedSetSockOpt(s, SOL_SOCKET, SO_REUSEPORT, (int)value, "reuse port");
#else
Y_UNUSED(s);
Y_UNUSED(value);
- ythrow TSystemError(ENOSYS) << "SO_REUSEPORT is not defined";
+ ythrow TSystemError(ENOSYS) << "SO_REUSEPORT is not available on Windows";
#endif
}
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"];