aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-02-23 10:47:37 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-02-23 10:58:53 +0300
commit0502345834ecaee02a5699c610ba2d1330c9619a (patch)
tree75ca1e38d924d7ca59b6829b1f0063caf77c4064
parent4416a6af47242170c265e50e5af0c585567a741d (diff)
downloadydb-0502345834ecaee02a5699c610ba2d1330c9619a.tar.gz
Intermediate changes
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/strategies/_internal/utils.py4
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
-rw-r--r--yt/yt/client/api/client_common.h9
-rw-r--r--yt/yt/client/api/rpc_proxy/client_base.cpp4
-rw-r--r--yt/yt/client/driver/table_commands.cpp6
-rw-r--r--yt/yt/core/rpc/grpc/config.cpp2
-rw-r--r--yt/yt/core/rpc/grpc/config.h8
-rw-r--r--yt/yt/core/rpc/grpc/public.h2
-rw-r--r--yt/yt/core/rpc/service_detail.cpp14
-rw-r--r--yt/yt/core/rpc/service_detail.h3
-rw-r--r--yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto2
14 files changed, 40 insertions, 22 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 21f727a546..c900020993 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.98.2
+Version: 6.98.3
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/internal/conjecture/junkdrawer.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
index 0da103a030..4a2140eccd 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
@@ -243,7 +243,7 @@ class LazySequenceCopy:
return i
-def clamp(lower: int, value: int, upper: int) -> int:
+def clamp(lower: float, value: float, upper: float) -> float:
"""Given a value and lower/upper bounds, 'clamp' the value so that
it satisfies lower <= value <= upper."""
return max(lower, min(value, upper))
diff --git a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/utils.py b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/utils.py
index bd56d2287e..7bf0514d44 100644
--- a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/utils.py
+++ b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/utils.py
@@ -17,6 +17,7 @@ import attr
from hypothesis.internal.cache import LRUReusedCache
from hypothesis.internal.compat import dataclass_asdict
+from hypothesis.internal.conjecture.junkdrawer import clamp
from hypothesis.internal.floats import float_to_int
from hypothesis.internal.reflection import proxies
from hypothesis.vendor.pretty import pretty
@@ -160,6 +161,9 @@ def to_jsonable(obj: object) -> object:
"""
if isinstance(obj, (str, int, float, bool, type(None))):
if isinstance(obj, int) and abs(obj) >= 2**63:
+ # Silently clamp very large ints to max_float, to avoid
+ # OverflowError when casting to float.
+ obj = clamp(-sys.float_info.max, obj, sys.float_info.max)
return float(obj)
return obj
if isinstance(obj, (list, tuple, set, frozenset)):
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 843784dc96..2dddb0e5f2 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, 98, 2)
+__version_info__ = (6, 98, 3)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 03a62edeb0..d818e87ba6 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.98.2)
+VERSION(6.98.3)
LICENSE(MPL-2.0)
diff --git a/yt/yt/client/api/client_common.h b/yt/yt/client/api/client_common.h
index bd9b89ffae..31395f015a 100644
--- a/yt/yt/client/api/client_common.h
+++ b/yt/yt/client/api/client_common.h
@@ -155,6 +155,11 @@ struct TSelectRowsOptionsBase
int SyntaxVersion = 1;
};
+DEFINE_ENUM(EExecutionBackend,
+ (Native)
+ (WebAssembly)
+);
+
struct TSelectRowsOptions
: public TSelectRowsOptionsBase
{
@@ -180,8 +185,8 @@ struct TSelectRowsOptions
TDetailedProfilingInfoPtr DetailedProfilingInfo;
//! YSON map with placeholder values for parameterized queries.
NYson::TYsonString PlaceholderValues;
- //! If |true| then WebAssembly execution backend is used.
- std::optional<bool> UseWebAssembly;
+ //! Native or WebAssembly execution backend.
+ std::optional<EExecutionBackend> ExecutionBackend;
//! Enables canonical SQL behaviour for relational operators, i.e. null </=/> value -> null.
bool UseCanonicalNullRelations = false;
//! Merge versioned rows from different stores when reading.
diff --git a/yt/yt/client/api/rpc_proxy/client_base.cpp b/yt/yt/client/api/rpc_proxy/client_base.cpp
index 191a57b935..14079ff161 100644
--- a/yt/yt/client/api/rpc_proxy/client_base.cpp
+++ b/yt/yt/client/api/rpc_proxy/client_base.cpp
@@ -999,8 +999,8 @@ TFuture<TSelectRowsResult> TClientBase::SelectRows(
req->set_fail_on_incomplete_result(options.FailOnIncompleteResult);
req->set_verbose_logging(options.VerboseLogging);
req->set_new_range_inference(options.NewRangeInference);
- if (options.UseWebAssembly) {
- req->set_use_web_assembly(*options.UseWebAssembly);
+ if (options.ExecutionBackend) {
+ req->set_execution_backend(static_cast<int>(*options.ExecutionBackend));
}
req->set_enable_code_cache(options.EnableCodeCache);
req->set_memory_limit_per_node(options.MemoryLimitPerNode);
diff --git a/yt/yt/client/driver/table_commands.cpp b/yt/yt/client/driver/table_commands.cpp
index a4d9d60a4d..a74c854b74 100644
--- a/yt/yt/client/driver/table_commands.cpp
+++ b/yt/yt/client/driver/table_commands.cpp
@@ -798,10 +798,10 @@ void TSelectRowsCommand::Register(TRegistrar registrar)
})
.Optional(/*init*/ false);
- registrar.ParameterWithUniversalAccessor<std::optional<bool>>(
- "use_web_assembly",
+ registrar.ParameterWithUniversalAccessor<std::optional<NApi::EExecutionBackend>>(
+ "execution_backend",
[] (TThis* command) -> auto& {
- return command->Options.UseWebAssembly;
+ return command->Options.ExecutionBackend;
})
.Optional(/*init*/ false);
}
diff --git a/yt/yt/core/rpc/grpc/config.cpp b/yt/yt/core/rpc/grpc/config.cpp
index dc3a003cb1..967a9a75d9 100644
--- a/yt/yt/core/rpc/grpc/config.cpp
+++ b/yt/yt/core/rpc/grpc/config.cpp
@@ -73,7 +73,7 @@ void TChannelCredentialsConfig::Register(TRegistrar registrar)
////////////////////////////////////////////////////////////////////////////////
-void TChannelConfigBase::Register(TRegistrar registrar)
+void TChannelConfigTemplate::Register(TRegistrar registrar)
{
registrar.Parameter("credentials", &TThis::Credentials)
.Optional();
diff --git a/yt/yt/core/rpc/grpc/config.h b/yt/yt/core/rpc/grpc/config.h
index 607d152c07..de0559bb73 100644
--- a/yt/yt/core/rpc/grpc/config.h
+++ b/yt/yt/core/rpc/grpc/config.h
@@ -122,24 +122,24 @@ DEFINE_REFCOUNTED_TYPE(TChannelCredentialsConfig)
////////////////////////////////////////////////////////////////////////////////
-class TChannelConfigBase
+class TChannelConfigTemplate
: public NYTree::TYsonStruct
{
public:
TChannelCredentialsConfigPtr Credentials;
THashMap<TString, NYTree::INodePtr> GrpcArguments;
- REGISTER_YSON_STRUCT(TChannelConfigBase);
+ REGISTER_YSON_STRUCT(TChannelConfigTemplate);
static void Register(TRegistrar registrar);
};
-DEFINE_REFCOUNTED_TYPE(TChannelConfigBase)
+DEFINE_REFCOUNTED_TYPE(TChannelConfigTemplate)
////////////////////////////////////////////////////////////////////////////////
class TChannelConfig
- : public TChannelConfigBase
+ : public TChannelConfigTemplate
{
public:
TString Address;
diff --git a/yt/yt/core/rpc/grpc/public.h b/yt/yt/core/rpc/grpc/public.h
index 58773a258b..a34e2e768a 100644
--- a/yt/yt/core/rpc/grpc/public.h
+++ b/yt/yt/core/rpc/grpc/public.h
@@ -12,7 +12,7 @@ DECLARE_REFCOUNTED_CLASS(TServerCredentialsConfig)
DECLARE_REFCOUNTED_CLASS(TServerAddressConfig)
DECLARE_REFCOUNTED_CLASS(TServerConfig)
DECLARE_REFCOUNTED_CLASS(TChannelCredentialsConfig)
-DECLARE_REFCOUNTED_CLASS(TChannelConfigBase)
+DECLARE_REFCOUNTED_CLASS(TChannelConfigTemplate)
DECLARE_REFCOUNTED_CLASS(TChannelConfig)
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/rpc/service_detail.cpp b/yt/yt/core/rpc/service_detail.cpp
index e1da6db45b..140aacf8e2 100644
--- a/yt/yt/core/rpc/service_detail.cpp
+++ b/yt/yt/core/rpc/service_detail.cpp
@@ -1341,7 +1341,7 @@ bool TRequestQueue::IsQueueSizeLimitExceeded() const
bool TRequestQueue::IsQueueByteSizeLimitExceeded() const
{
- return QueueBytesSize_.load(std::memory_order::relaxed) >=
+ return QueueByteSize_.load(std::memory_order::relaxed) >=
RuntimeInfo_->QueueByteSizeLimit.load(std::memory_order::relaxed);
}
@@ -1350,6 +1350,11 @@ int TRequestQueue::GetQueueSize() const
return QueueSize_.load(std::memory_order::relaxed);
}
+i64 TRequestQueue::GetQueueByteSize() const
+{
+ return QueueByteSize_.load(std::memory_order::relaxed);
+}
+
int TRequestQueue::GetConcurrency() const
{
return Concurrency_.load(std::memory_order::relaxed);
@@ -1464,7 +1469,7 @@ void TRequestQueue::IncrementQueueSize(const TServiceBase::TServiceContextPtr& c
auto requestSize =
GetMessageBodySize(context->GetRequestMessage()) +
GetTotalMessageAttachmentSize(context->GetRequestMessage());
- QueueBytesSize_ += requestSize;
+ QueueByteSize_ += requestSize;
}
void TRequestQueue::DecrementQueueSize(const TServiceBase::TServiceContextPtr& context)
@@ -1475,7 +1480,7 @@ void TRequestQueue::DecrementQueueSize(const TServiceBase::TServiceContextPtr&
auto requestSize =
GetMessageBodySize(context->GetRequestMessage()) +
GetTotalMessageAttachmentSize(context->GetRequestMessage());
- auto oldQueueBytesSize = QueueBytesSize_.fetch_sub(requestSize);
+ auto oldQueueBytesSize = QueueByteSize_.fetch_sub(requestSize);
YT_ASSERT(oldQueueBytesSize >= requestSize);
}
@@ -1860,6 +1865,9 @@ void TServiceBase::RegisterRequestQueue(
profiler.AddFuncGauge("/request_queue_size", MakeStrong(this), [=] {
return requestQueue->GetQueueSize();
});
+ profiler.AddFuncGauge("/request_queue_byte_size", MakeStrong(this), [=] {
+ return requestQueue->GetQueueByteSize();
+ });
profiler.AddFuncGauge("/concurrency", MakeStrong(this), [=] {
return requestQueue->GetConcurrency();
});
diff --git a/yt/yt/core/rpc/service_detail.h b/yt/yt/core/rpc/service_detail.h
index 754b371dae..5ae839ae0d 100644
--- a/yt/yt/core/rpc/service_detail.h
+++ b/yt/yt/core/rpc/service_detail.h
@@ -1035,6 +1035,7 @@ public:
bool IsQueueByteSizeLimitExceeded() const;
int GetQueueSize() const;
+ i64 GetQueueByteSize() const;
int GetConcurrency() const;
void OnRequestArrived(TServiceBase::TServiceContextPtr context);
@@ -1067,7 +1068,7 @@ private:
std::atomic<bool> Throttled_ = false;
std::atomic<int> QueueSize_ = 0;
- std::atomic<i64> QueueBytesSize_ = 0;
+ std::atomic<i64> QueueByteSize_ = 0;
moodycamel::ConcurrentQueue<TServiceBase::TServiceContextPtr> Queue_;
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 5abd081653..f20d71c352 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
@@ -591,7 +591,7 @@ message TReqSelectRows
optional bool use_canonical_null_relations = 20;
optional bool merge_versioned_rows = 21;
optional int32 syntax_version = 22 [default = 1];
- optional bool use_web_assembly = 23;
+ optional int32 execution_backend = 23; // EExecutionBackend
optional TSuppressableAccessTrackingOptions suppressable_access_tracking_options = 104;
}