-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
Description
Bug Report
YDB Python SDK version: 3.5.1
ydb-python-sdk/ydb/_topic_reader/topic_reader_sync.py
Lines 89 to 96 in 6177adb
def receive_batch( | |
self, | |
*, | |
max_messages: typing.Union[int, None] = None, | |
max_bytes: typing.Union[int, None] = None, | |
timeout: Union[float, None] = None, | |
) -> Union[PublicBatch, None]: | |
""" |
Example of calc size for a message:
ydb-python-sdk/ydb/_topic_writer/topic_writer.py
Lines 252 to 259 in 8177d7f
def _split_messages_by_size_with_default_overhead( | |
messages: List[InternalMessage], | |
) -> List[List[InternalMessage]]: | |
def get_message_size(msg: InternalMessage): | |
return len(msg.data) + _message_data_overhead | |
return _split_messages_by_size(messages, connection._DEFAULT_MAX_GRPC_MESSAGE_SIZE, get_message_size) | |