mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Fix assertion for getImplementationBufferOffset() for Log family on S3
Test test_log_family_s3/test.py::test_log_family_s3[TinyLog]: clickhouse: ./src/Disks/IO/AsynchronousReadIndirectBufferFromRemoteFS.cpp:213: virtual bool DB::AsynchronousReadIndirectBufferFromRemoteFS::nextImpl(): Assertion `file_offset_of_buffer_end == impl->getImplementationBufferOffset()' failed. v2: fix assertion instead of adjusting file_offset_of_buffer_end in ReadBufferFromRemoteFSGather.cpp Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
71285edfbd
commit
5d0a185cb3
@ -210,7 +210,11 @@ bool AsynchronousReadIndirectBufferFromRemoteFS::nextImpl()
|
|||||||
ProfileEvents::increment(ProfileEvents::AsynchronousReadWaitMicroseconds, watch.elapsedMicroseconds());
|
ProfileEvents::increment(ProfileEvents::AsynchronousReadWaitMicroseconds, watch.elapsedMicroseconds());
|
||||||
|
|
||||||
file_offset_of_buffer_end = impl->getFileOffsetOfBufferEnd();
|
file_offset_of_buffer_end = impl->getFileOffsetOfBufferEnd();
|
||||||
assert(file_offset_of_buffer_end == impl->getImplementationBufferOffset());
|
/// In case of multiple files for the same file in clickhouse (i.e. log family)
|
||||||
|
/// file_offset_of_buffer_end will not match getImplementationBufferOffset()
|
||||||
|
/// so we use [impl->getImplementationBufferOffset(), impl->getFileSize()]
|
||||||
|
assert(file_offset_of_buffer_end >= impl->getImplementationBufferOffset());
|
||||||
|
assert(file_offset_of_buffer_end <= impl->getFileSize());
|
||||||
|
|
||||||
prefetch_future = {};
|
prefetch_future = {};
|
||||||
return size;
|
return size;
|
||||||
|
Loading…
Reference in New Issue
Block a user