Fix assert

This commit is contained in:
kssenii 2024-11-13 17:46:02 +01:00
parent 626f49df4c
commit 8c1dee30a9

View File

@ -399,6 +399,15 @@ CachedOnDiskReadBufferFromFile::ReadFromFileSegmentStatePtr CachedOnDiskReadBuff
auto downloader_id = file_segment.getOrSetDownloader(); auto downloader_id = file_segment.getOrSetDownloader();
if (downloader_id == FileSegment::getCallerId()) if (downloader_id == FileSegment::getCallerId())
{ {
SCOPE_EXIT(
{
if (result->read_type != ReadType::REMOTE_FS_READ_AND_PUT_IN_CACHE
&& file_segment.isDownloader())
{
file_segment.resetDownloader();
}
});
if (canStartFromCache(offset, file_segment)) if (canStartFromCache(offset, file_segment))
{ {
/// segment{k} /// segment{k}