aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-07-09 17:50:48 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-07-09 18:11:34 +0300
commit1a588ac4a33af75cc93036c1c23220dd334eb70f (patch)
treed5c6e4a1a3b7ca94306b7887aabef6e734788add
parent2c5bdb9f4c018e240baadee29088c12f9c8954fb (diff)
downloadydb-1a588ac4a33af75cc93036c1c23220dd334eb70f.tar.gz
Intermediate changes
-rw-r--r--contrib/python/tenacity/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/tenacity/py3/README.rst36
-rw-r--r--contrib/python/tenacity/py3/tenacity/__init__.py8
-rw-r--r--contrib/python/tenacity/py3/tenacity/asyncio/__init__.py13
-rw-r--r--contrib/python/tenacity/py3/ya.make2
-rw-r--r--contrib/python/ydb/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/ydb/py3/ya.make2
-rw-r--r--contrib/python/ydb/py3/ydb/_apis.py1
-rw-r--r--contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py136
-rw-r--r--contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py39
-rw-r--r--contrib/python/ydb/py3/ydb/topic.py98
-rw-r--r--contrib/python/ydb/py3/ydb/ydb_version.py2
-rw-r--r--yt/cpp/mapreduce/io/ut/readers_ut.cpp18
-rw-r--r--yt/cpp/mapreduce/io/ut/ut_row.proto6
14 files changed, 336 insertions, 29 deletions
diff --git a/contrib/python/tenacity/py3/.dist-info/METADATA b/contrib/python/tenacity/py3/.dist-info/METADATA
index cd789a8975..f6d223471d 100644
--- a/contrib/python/tenacity/py3/.dist-info/METADATA
+++ b/contrib/python/tenacity/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: tenacity
-Version: 8.4.1
+Version: 8.5.0
Summary: Retry code until it succeeds
Home-page: https://github.com/jd/tenacity
Author: Julien Danjou
diff --git a/contrib/python/tenacity/py3/README.rst b/contrib/python/tenacity/py3/README.rst
index 65dd208bdf..928ddd99b9 100644
--- a/contrib/python/tenacity/py3/README.rst
+++ b/contrib/python/tenacity/py3/README.rst
@@ -124,8 +124,8 @@ retrying stuff.
print("Stopping after 10 seconds")
raise Exception
-If you're on a tight deadline, and exceeding your delay time isn't ok,
-then you can give up on retries one attempt before you would exceed the delay.
+If you're on a tight deadline, and exceeding your delay time isn't ok,
+then you can give up on retries one attempt before you would exceed the delay.
.. testcode::
@@ -362,7 +362,7 @@ Statistics
~~~~~~~~~~
You can access the statistics about the retry made over a function by using the
-`retry` attribute attached to the function and its `statistics` attribute:
+`statistics` attribute attached to the function:
.. testcode::
@@ -375,7 +375,7 @@ You can access the statistics about the retry made over a function by using the
except Exception:
pass
- print(raise_my_exception.retry.statistics)
+ print(raise_my_exception.statistics)
.. testoutput::
:hide:
@@ -495,7 +495,7 @@ using the `retry_with` function attached to the wrapped function:
except Exception:
pass
- print(raise_my_exception.retry.statistics)
+ print(raise_my_exception.statistics)
.. testoutput::
:hide:
@@ -514,6 +514,32 @@ to use the `retry` decorator - you can instead use `Retrying` directly:
retryer = Retrying(stop=stop_after_attempt(max_attempts), reraise=True)
retryer(never_good_enough, 'I really do try')
+You may also want to change the behaviour of a decorated function temporarily,
+like in tests to avoid unnecessary wait times. You can modify/patch the `retry`
+attribute attached to the function. Bear in mind this is a write-only attribute,
+statistics should be read from the function `statistics` attribute.
+
+.. testcode::
+
+ @retry(stop=stop_after_attempt(3), wait=wait_fixed(3))
+ def raise_my_exception():
+ raise MyException("Fail")
+
+ from unittest import mock
+
+ with mock.patch.object(raise_my_exception.retry, "wait", wait_fixed(0)):
+ try:
+ raise_my_exception()
+ except Exception:
+ pass
+
+ print(raise_my_exception.statistics)
+
+.. testoutput::
+ :hide:
+
+ ...
+
Retrying code block
~~~~~~~~~~~~~~~~~~~
diff --git a/contrib/python/tenacity/py3/tenacity/__init__.py b/contrib/python/tenacity/py3/tenacity/__init__.py
index 7de36d4345..02057a07c0 100644
--- a/contrib/python/tenacity/py3/tenacity/__init__.py
+++ b/contrib/python/tenacity/py3/tenacity/__init__.py
@@ -329,13 +329,19 @@ class BaseRetrying(ABC):
f, functools.WRAPPER_ASSIGNMENTS + ("__defaults__", "__kwdefaults__")
)
def wrapped_f(*args: t.Any, **kw: t.Any) -> t.Any:
- return self(f, *args, **kw)
+ # Always create a copy to prevent overwriting the local contexts when
+ # calling the same wrapped functions multiple times in the same stack
+ copy = self.copy()
+ wrapped_f.statistics = copy.statistics # type: ignore[attr-defined]
+ return copy(f, *args, **kw)
def retry_with(*args: t.Any, **kwargs: t.Any) -> WrappedFn:
return self.copy(*args, **kwargs).wraps(f)
+ # Preserve attributes
wrapped_f.retry = self # type: ignore[attr-defined]
wrapped_f.retry_with = retry_with # type: ignore[attr-defined]
+ wrapped_f.statistics = {} # type: ignore[attr-defined]
return wrapped_f # type: ignore[return-value]
diff --git a/contrib/python/tenacity/py3/tenacity/asyncio/__init__.py b/contrib/python/tenacity/py3/tenacity/asyncio/__init__.py
index 6d63ebcfab..a92609140e 100644
--- a/contrib/python/tenacity/py3/tenacity/asyncio/__init__.py
+++ b/contrib/python/tenacity/py3/tenacity/asyncio/__init__.py
@@ -175,18 +175,23 @@ class AsyncRetrying(BaseRetrying):
raise StopAsyncIteration
def wraps(self, fn: WrappedFn) -> WrappedFn:
- fn = super().wraps(fn)
+ wrapped = super().wraps(fn)
# Ensure wrapper is recognized as a coroutine function.
@functools.wraps(
fn, functools.WRAPPER_ASSIGNMENTS + ("__defaults__", "__kwdefaults__")
)
async def async_wrapped(*args: t.Any, **kwargs: t.Any) -> t.Any:
- return await fn(*args, **kwargs)
+ # Always create a copy to prevent overwriting the local contexts when
+ # calling the same wrapped functions multiple times in the same stack
+ copy = self.copy()
+ async_wrapped.statistics = copy.statistics # type: ignore[attr-defined]
+ return await copy(fn, *args, **kwargs)
# Preserve attributes
- async_wrapped.retry = fn.retry # type: ignore[attr-defined]
- async_wrapped.retry_with = fn.retry_with # type: ignore[attr-defined]
+ async_wrapped.retry = self # type: ignore[attr-defined]
+ async_wrapped.retry_with = wrapped.retry_with # type: ignore[attr-defined]
+ async_wrapped.statistics = {} # type: ignore[attr-defined]
return async_wrapped # type: ignore[return-value]
diff --git a/contrib/python/tenacity/py3/ya.make b/contrib/python/tenacity/py3/ya.make
index d75e15b99f..66c925dc76 100644
--- a/contrib/python/tenacity/py3/ya.make
+++ b/contrib/python/tenacity/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(8.4.1)
+VERSION(8.5.0)
LICENSE(Apache-2.0)
diff --git a/contrib/python/ydb/py3/.dist-info/METADATA b/contrib/python/ydb/py3/.dist-info/METADATA
index 2ddd4599a0..64e6538edb 100644
--- a/contrib/python/ydb/py3/.dist-info/METADATA
+++ b/contrib/python/ydb/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: ydb
-Version: 3.12.3
+Version: 3.13.0
Summary: YDB Python SDK
Home-page: http://github.com/ydb-platform/ydb-python-sdk
Author: Yandex LLC
diff --git a/contrib/python/ydb/py3/ya.make b/contrib/python/ydb/py3/ya.make
index 0893bfb313..d0fb350d8c 100644
--- a/contrib/python/ydb/py3/ya.make
+++ b/contrib/python/ydb/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(3.12.3)
+VERSION(3.13.0)
LICENSE(Apache-2.0)
diff --git a/contrib/python/ydb/py3/ydb/_apis.py b/contrib/python/ydb/py3/ydb/_apis.py
index 9ad2a32f21..e340150996 100644
--- a/contrib/python/ydb/py3/ydb/_apis.py
+++ b/contrib/python/ydb/py3/ydb/_apis.py
@@ -122,6 +122,7 @@ class TopicService(object):
CreateTopic = "CreateTopic"
DescribeTopic = "DescribeTopic"
+ AlterTopic = "AlterTopic"
DropTopic = "DropTopic"
StreamRead = "StreamRead"
StreamWrite = "StreamWrite"
diff --git a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py
index 54027b3ab1..634ffb536b 100644
--- a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py
+++ b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py
@@ -32,7 +32,7 @@ from .common_utils import (
)
-class Codec(int, IToPublic):
+class Codec(int, IToPublic, IFromPublic):
CODEC_UNSPECIFIED = 0
CODEC_RAW = 1
CODEC_GZIP = 2
@@ -46,9 +46,13 @@ class Codec(int, IToPublic):
def to_public(self) -> ydb_topic_public_types.PublicCodec:
return ydb_topic_public_types.PublicCodec(int(self))
+ @staticmethod
+ def from_public(codec: Union[ydb_topic_public_types.PublicCodec, int]) -> "Codec":
+ return Codec(int(codec))
+
@dataclass
-class SupportedCodecs(IToProto, IFromProto, IToPublic):
+class SupportedCodecs(IToProto, IFromProto, IToPublic, IFromPublic):
codecs: List[Codec]
def to_proto(self) -> ydb_topic_pb2.SupportedCodecs:
@@ -68,6 +72,15 @@ class SupportedCodecs(IToProto, IFromProto, IToPublic):
def to_public(self) -> List[ydb_topic_public_types.PublicCodec]:
return list(map(Codec.to_public, self.codecs))
+ @staticmethod
+ def from_public(
+ codecs: Optional[List[Union[ydb_topic_public_types.PublicCodec, int]]]
+ ) -> Optional["SupportedCodecs"]:
+ if codecs is None:
+ return None
+
+ return SupportedCodecs(codecs=[Codec.from_public(codec) for codec in codecs])
+
@dataclass(order=True)
class OffsetsRange(IFromProto, IToProto):
@@ -883,6 +896,41 @@ class Consumer(IToProto, IFromProto, IFromPublic, IToPublic):
@dataclass
+class AlterConsumer(IToProto, IFromPublic):
+ name: str
+ set_important: Optional[bool]
+ set_read_from: Optional[datetime.datetime]
+ set_supported_codecs: Optional[SupportedCodecs]
+ alter_attributes: Optional[Dict[str, str]]
+
+ def to_proto(self) -> ydb_topic_pb2.AlterConsumer:
+ supported_codecs = None
+ if self.set_supported_codecs is not None:
+ supported_codecs = self.set_supported_codecs.to_proto()
+
+ return ydb_topic_pb2.AlterConsumer(
+ name=self.name,
+ set_important=self.set_important,
+ set_read_from=proto_timestamp_from_datetime(self.set_read_from),
+ set_supported_codecs=supported_codecs,
+ alter_attributes=self.alter_attributes,
+ )
+
+ @staticmethod
+ def from_public(alter_consumer: ydb_topic_public_types.PublicAlterConsumer) -> AlterConsumer:
+ if not alter_consumer:
+ return None
+
+ return AlterConsumer(
+ name=alter_consumer.name,
+ set_important=alter_consumer.set_important,
+ set_read_from=alter_consumer.set_read_from,
+ set_supported_codecs=SupportedCodecs.from_public(alter_consumer.set_supported_codecs),
+ alter_attributes=alter_consumer.alter_attributes,
+ )
+
+
+@dataclass
class PartitioningSettings(IToProto, IFromProto):
min_active_partitions: int
partition_count_limit: int
@@ -901,6 +949,18 @@ class PartitioningSettings(IToProto, IFromProto):
)
+@dataclass
+class AlterPartitioningSettings(IToProto):
+ set_min_active_partitions: Optional[int]
+ set_partition_count_limit: Optional[int]
+
+ def to_proto(self) -> ydb_topic_pb2.AlterPartitioningSettings:
+ return ydb_topic_pb2.AlterPartitioningSettings(
+ set_min_active_partitions=self.set_min_active_partitions,
+ set_partition_count_limit=self.set_partition_count_limit,
+ )
+
+
class MeteringMode(int, IFromProto, IFromPublic, IToPublic):
UNSPECIFIED = 0
RESERVED_CAPACITY = 1
@@ -995,6 +1055,78 @@ class CreateTopicResult:
@dataclass
+class AlterTopicRequest(IToProto, IFromPublic):
+ path: str
+ add_consumers: Optional[List["Consumer"]]
+ alter_partitioning_settings: Optional[AlterPartitioningSettings]
+ set_retention_period: Optional[datetime.timedelta]
+ set_retention_storage_mb: Optional[int]
+ set_supported_codecs: Optional[SupportedCodecs]
+ set_partition_write_burst_bytes: Optional[int]
+ set_partition_write_speed_bytes_per_second: Optional[int]
+ alter_attributes: Optional[Dict[str, str]]
+ alter_consumers: Optional[List[AlterConsumer]]
+ drop_consumers: Optional[List[str]]
+ set_metering_mode: Optional["MeteringMode"]
+
+ def to_proto(self) -> ydb_topic_pb2.AlterTopicRequest:
+ supported_codecs = None
+ if self.set_supported_codecs is not None:
+ supported_codecs = self.set_supported_codecs.to_proto()
+
+ return ydb_topic_pb2.AlterTopicRequest(
+ path=self.path,
+ add_consumers=[consumer.to_proto() for consumer in self.add_consumers],
+ alter_partitioning_settings=self.alter_partitioning_settings.to_proto(),
+ set_retention_period=proto_duration_from_timedelta(self.set_retention_period),
+ set_retention_storage_mb=self.set_retention_storage_mb,
+ set_supported_codecs=supported_codecs,
+ set_partition_write_burst_bytes=self.set_partition_write_burst_bytes,
+ set_partition_write_speed_bytes_per_second=self.set_partition_write_speed_bytes_per_second,
+ alter_attributes=self.alter_attributes,
+ alter_consumers=[consumer.to_proto() for consumer in self.alter_consumers],
+ drop_consumers=list(self.drop_consumers),
+ set_metering_mode=self.set_metering_mode,
+ )
+
+ @staticmethod
+ def from_public(req: ydb_topic_public_types.AlterTopicRequestParams) -> AlterTopicRequest:
+ add_consumers = []
+ if req.add_consumers:
+ for consumer in req.add_consumers:
+ if isinstance(consumer, str):
+ consumer = ydb_topic_public_types.PublicConsumer(name=consumer)
+ add_consumers.append(Consumer.from_public(consumer))
+
+ alter_consumers = []
+ if req.alter_consumers:
+ for consumer in req.alter_consumers:
+ if isinstance(consumer, str):
+ consumer = ydb_topic_public_types.PublicAlterConsumer(name=consumer)
+ alter_consumers.append(AlterConsumer.from_public(consumer))
+
+ drop_consumers = req.drop_consumers if req.drop_consumers else []
+
+ return AlterTopicRequest(
+ path=req.path,
+ alter_partitioning_settings=AlterPartitioningSettings(
+ set_min_active_partitions=req.set_min_active_partitions,
+ set_partition_count_limit=req.set_partition_count_limit,
+ ),
+ add_consumers=add_consumers,
+ set_retention_period=req.set_retention_period,
+ set_retention_storage_mb=req.set_retention_storage_mb,
+ set_supported_codecs=SupportedCodecs.from_public(req.set_supported_codecs),
+ set_partition_write_burst_bytes=req.set_partition_write_burst_bytes,
+ set_partition_write_speed_bytes_per_second=req.set_partition_write_speed_bytes_per_second,
+ alter_attributes=req.alter_attributes,
+ alter_consumers=alter_consumers,
+ drop_consumers=drop_consumers,
+ set_metering_mode=MeteringMode.from_public(req.set_metering_mode),
+ )
+
+
+@dataclass
class DescribeTopicRequest:
path: str
include_stats: bool
diff --git a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py
index f484eeeacd..917dd53363 100644
--- a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py
+++ b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic_public_types.py
@@ -29,6 +29,23 @@ class CreateTopicRequestParams:
metering_mode: Optional["PublicMeteringMode"]
+@dataclass
+class AlterTopicRequestParams:
+ path: str
+ set_min_active_partitions: Optional[int]
+ set_partition_count_limit: Optional[int]
+ add_consumers: Optional[List[Union["PublicConsumer", str]]]
+ alter_consumers: Optional[List[Union["PublicAlterConsumer", str]]]
+ drop_consumers: Optional[List[str]]
+ alter_attributes: Optional[Dict[str, str]]
+ set_metering_mode: Optional["PublicMeteringMode"]
+ set_partition_write_speed_bytes_per_second: Optional[int]
+ set_partition_write_burst_bytes: Optional[int]
+ set_retention_period: Optional[datetime.timedelta]
+ set_retention_storage_mb: Optional[int]
+ set_supported_codecs: Optional[List[Union["PublicCodec", int]]]
+
+
class PublicCodec(int):
"""
Codec value may contain any int number.
@@ -73,6 +90,28 @@ class PublicConsumer:
@dataclass
+class PublicAlterConsumer:
+ name: str
+ set_important: Optional[bool] = None
+ """
+ Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
+ User should take care that such consumer never stalls, to prevent running out of disk space.
+ """
+
+ set_read_from: Optional[datetime.datetime] = None
+ "All messages with smaller server written_at timestamp will be skipped."
+
+ set_supported_codecs: Optional[List[PublicCodec]] = None
+ """
+ List of supported codecs by this consumer.
+ supported_codecs on topic must be contained inside this list.
+ """
+
+ alter_attributes: Optional[Dict[str, str]] = None
+ "Attributes of consumer"
+
+
+@dataclass
class DropTopicRequestParams(IToProto):
path: str
diff --git a/contrib/python/ydb/py3/ydb/topic.py b/contrib/python/ydb/py3/ydb/topic.py
index 948bcff4cf..f0b872e297 100644
--- a/contrib/python/ydb/py3/ydb/topic.py
+++ b/contrib/python/ydb/py3/ydb/topic.py
@@ -6,6 +6,7 @@ __all__ = [
"TopicClientSettings",
"TopicCodec",
"TopicConsumer",
+ "TopicAlterConsumer",
"TopicDescription",
"TopicError",
"TopicMeteringMode",
@@ -77,6 +78,7 @@ from ._grpc.grpcwrapper.ydb_topic_public_types import ( # noqa: F401
PublicPartitionStats as TopicPartitionStats,
PublicCodec as TopicCodec,
PublicConsumer as TopicConsumer,
+ PublicAlterConsumer as TopicAlterConsumer,
PublicMeteringMode as TopicMeteringMode,
)
@@ -145,6 +147,53 @@ class TopicClientAsyncIO:
_wrap_operation,
)
+ async def alter_topic(
+ self,
+ path: str,
+ set_min_active_partitions: Optional[int] = None,
+ set_partition_count_limit: Optional[int] = None,
+ add_consumers: Optional[List[Union[TopicConsumer, str]]] = None,
+ alter_consumers: Optional[List[Union[TopicAlterConsumer, str]]] = None,
+ drop_consumers: Optional[List[str]] = None,
+ alter_attributes: Optional[Dict[str, str]] = None,
+ set_metering_mode: Optional[TopicMeteringMode] = None,
+ set_partition_write_speed_bytes_per_second: Optional[int] = None,
+ set_partition_write_burst_bytes: Optional[int] = None,
+ set_retention_period: Optional[datetime.timedelta] = None,
+ set_retention_storage_mb: Optional[int] = None,
+ set_supported_codecs: Optional[List[Union[TopicCodec, int]]] = None,
+ ):
+ """
+ alter topic command
+
+ :param path: full path to topic
+ :param set_min_active_partitions: Minimum partition count auto merge would stop working at.
+ :param set_partition_count_limit: Limit for total partition count, including active (open for write)
+ and read-only partitions.
+ :param add_consumers: List of consumers for this topic to add
+ :param alter_consumers: List of consumers for this topic to alter
+ :param drop_consumers: List of consumer names for this topic to drop
+ :param alter_attributes: User and server attributes of topic.
+ Server attributes starts from "_" and will be validated by server.
+ :param set_metering_mode: Metering mode for the topic in a serverless database
+ :param set_partition_write_speed_bytes_per_second: Partition write speed in bytes per second
+ :param set_partition_write_burst_bytes: Burst size for write in partition, in bytes
+ :param set_retention_period: How long data in partition should be stored
+ :param set_retention_storage_mb: How much data in partition should be stored
+ :param set_supported_codecs: List of allowed codecs for writers. Writes with codec not from this list are forbidden.
+ Empty list mean disable codec compatibility checks for the topic.
+ """
+ args = locals().copy()
+ del args["self"]
+ req = _ydb_topic_public_types.AlterTopicRequestParams(**args)
+ req = _ydb_topic.AlterTopicRequest.from_public(req)
+ await self._driver(
+ req.to_proto(),
+ _apis.TopicService.Stub,
+ _apis.TopicService.AlterTopic,
+ _wrap_operation,
+ )
+
async def describe_topic(self, path: str, include_stats: bool = False) -> TopicDescription:
args = locals().copy()
del args["self"]
@@ -297,6 +346,55 @@ class TopicClient:
_wrap_operation,
)
+ def alter_topic(
+ self,
+ path: str,
+ set_min_active_partitions: Optional[int] = None,
+ set_partition_count_limit: Optional[int] = None,
+ add_consumers: Optional[List[Union[TopicConsumer, str]]] = None,
+ alter_consumers: Optional[List[Union[TopicAlterConsumer, str]]] = None,
+ drop_consumers: Optional[List[str]] = None,
+ alter_attributes: Optional[Dict[str, str]] = None,
+ set_metering_mode: Optional[TopicMeteringMode] = None,
+ set_partition_write_speed_bytes_per_second: Optional[int] = None,
+ set_partition_write_burst_bytes: Optional[int] = None,
+ set_retention_period: Optional[datetime.timedelta] = None,
+ set_retention_storage_mb: Optional[int] = None,
+ set_supported_codecs: Optional[List[Union[TopicCodec, int]]] = None,
+ ):
+ """
+ alter topic command
+
+ :param path: full path to topic
+ :param set_min_active_partitions: Minimum partition count auto merge would stop working at.
+ :param set_partition_count_limit: Limit for total partition count, including active (open for write)
+ and read-only partitions.
+ :param add_consumers: List of consumers for this topic to add
+ :param alter_consumers: List of consumers for this topic to alter
+ :param drop_consumers: List of consumer names for this topic to drop
+ :param alter_attributes: User and server attributes of topic.
+ Server attributes starts from "_" and will be validated by server.
+ :param set_metering_mode: Metering mode for the topic in a serverless database
+ :param set_partition_write_speed_bytes_per_second: Partition write speed in bytes per second
+ :param set_partition_write_burst_bytes: Burst size for write in partition, in bytes
+ :param set_retention_period: How long data in partition should be stored
+ :param set_retention_storage_mb: How much data in partition should be stored
+ :param set_supported_codecs: List of allowed codecs for writers. Writes with codec not from this list are forbidden.
+ Empty list mean disable codec compatibility checks for the topic.
+ """
+ args = locals().copy()
+ del args["self"]
+ self._check_closed()
+
+ req = _ydb_topic_public_types.AlterTopicRequestParams(**args)
+ req = _ydb_topic.AlterTopicRequest.from_public(req)
+ self._driver(
+ req.to_proto(),
+ _apis.TopicService.Stub,
+ _apis.TopicService.AlterTopic,
+ _wrap_operation,
+ )
+
def describe_topic(self, path: str, include_stats: bool = False) -> TopicDescription:
args = locals().copy()
del args["self"]
diff --git a/contrib/python/ydb/py3/ydb/ydb_version.py b/contrib/python/ydb/py3/ydb/ydb_version.py
index d1c4467b81..2edc0629d7 100644
--- a/contrib/python/ydb/py3/ydb/ydb_version.py
+++ b/contrib/python/ydb/py3/ydb/ydb_version.py
@@ -1 +1 @@
-VERSION = "3.12.3"
+VERSION = "3.13.0"
diff --git a/yt/cpp/mapreduce/io/ut/readers_ut.cpp b/yt/cpp/mapreduce/io/ut/readers_ut.cpp
index 86d06629a2..5068dbb6bc 100644
--- a/yt/cpp/mapreduce/io/ut/readers_ut.cpp
+++ b/yt/cpp/mapreduce/io/ut/readers_ut.cpp
@@ -197,13 +197,13 @@ TEST(TReadersTest, ProtobufGood)
TLenvalProtoTableReader reader(proxy, {TRow::descriptor()});
TRow row1, row2;
- row1.SetString("foobar");
- row1.SetInt32(15);
- row1.SetFixed64(100500);
+ row1.set_string_field("foobar");
+ row1.set_int32_field(15);
+ row1.set_fixed64_field(100500);
- row2.SetString("abc");
- row2.SetInt32(31);
- row2.SetFixed64(-1);
+ row2.set_string_field("abc");
+ row2.set_int32_field(31);
+ row2.set_fixed64_field(-1);
TVector<TRow> expectedRows = {row1, row2};
for (const auto& expectedRow : expectedRows) {
@@ -211,9 +211,9 @@ TEST(TReadersTest, ProtobufGood)
EXPECT_TRUE(reader.IsValid());
EXPECT_TRUE(!reader.IsRawReaderExhausted());
reader.ReadRow(&row);
- EXPECT_EQ(row.GetString(), expectedRow.GetString());
- EXPECT_EQ(row.GetInt32(), expectedRow.GetInt32());
- EXPECT_EQ(row.GetFixed64(), expectedRow.GetFixed64());
+ EXPECT_EQ(row.string_field(), expectedRow.string_field());
+ EXPECT_EQ(row.int32_field(), expectedRow.int32_field());
+ EXPECT_EQ(row.fixed64_field(), expectedRow.fixed64_field());
reader.Next();
}
EXPECT_TRUE(!reader.IsValid());
diff --git a/yt/cpp/mapreduce/io/ut/ut_row.proto b/yt/cpp/mapreduce/io/ut/ut_row.proto
index 6a9649e4c6..87c8e0c281 100644
--- a/yt/cpp/mapreduce/io/ut/ut_row.proto
+++ b/yt/cpp/mapreduce/io/ut/ut_row.proto
@@ -1,7 +1,7 @@
package NYT.NTesting;
message TRow {
- optional string String = 1;
- optional int32 Int32 = 2;
- optional fixed64 Fixed64 = 3;
+ optional string string_field = 1;
+ optional int32 int32_field = 2;
+ optional fixed64 fixed64_field = 3;
}