mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Try fix race
This commit is contained in:
parent
8c1dee30a9
commit
2a5385b4a0
@ -321,8 +321,10 @@ void FileSegment::resetRemoteFileReader()
|
|||||||
FileSegment::RemoteFileReaderPtr FileSegment::extractRemoteFileReader()
|
FileSegment::RemoteFileReaderPtr FileSegment::extractRemoteFileReader()
|
||||||
{
|
{
|
||||||
auto lk = lock();
|
auto lk = lock();
|
||||||
if (remote_file_reader && (download_state == State::DOWNLOADED
|
if (remote_file_reader
|
||||||
|| download_state == State::PARTIALLY_DOWNLOADED_NO_CONTINUATION))
|
&& remote_file_reader.unique()
|
||||||
|
&& (download_state == State::DOWNLOADED
|
||||||
|
|| download_state == State::PARTIALLY_DOWNLOADED_NO_CONTINUATION))
|
||||||
{
|
{
|
||||||
return std::move(remote_file_reader);
|
return std::move(remote_file_reader);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user