Merge pull request #35984 from ClickHouse/fix-url-data-race

Fix data race in StorageURL
This commit is contained in:
Antonio Andelic 2022-04-06 14:36:19 +02:00 committed by GitHub
commit cda8a18fe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,14 +224,12 @@ namespace
} }
Chunk chunk; Chunk chunk;
std::lock_guard lock(reader_mutex);
if (reader->pull(chunk)) if (reader->pull(chunk))
return chunk; return chunk;
{ pipeline->reset();
std::lock_guard lock(reader_mutex); reader.reset();
pipeline->reset();
reader.reset();
}
} }
} }