long2ice / asynch

An asyncio ClickHouse Python Driver with native (TCP) interface support.
https://github.com/long2ice/asynch
Apache License 2.0
185 stars 43 forks source link

Fix a `bytearray index out of range` error while reading a string. #90

Closed pufit closed 8 months ago

pufit commented 10 months ago

Sometimes, a data chunk we are trying to read from CH can exceed a buffer size. If it happens, the data will be split into two parts. In some cases it can happen during the read_varint, so we must fetch the next buffered chunk before finishing the read.

Closes

itssimon commented 8 months ago

Just hit this as well in production.

@long2ice This would be another good one to merge and release to make asynch more stable!

stankudrow commented 8 months ago

@pufit , could you possibly provide a detailed example to reproduce the problem? @itssimon , does this change solve the problem? If so, @long2ice , wouldn't you mind to merge the PR?

long2ice commented 8 months ago

Thanks!