mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Merge pull request #61266 from ClickHouse/fix-disk-web-exists
Fix `01417_freeze_partition_verbose`
This commit is contained in:
commit
992465f6ed
@ -86,6 +86,10 @@ WebObjectStorage::loadFiles(const String & path, const std::unique_lock<std::sha
|
||||
loaded_files.emplace_back(file_path);
|
||||
}
|
||||
|
||||
/// Check for not found url after read attempt, because of delayed initialization.
|
||||
if (metadata_buf->hasNotFoundURL())
|
||||
return {};
|
||||
|
||||
auto [it, inserted] = files.add(path, FileData::createDirectoryInfo(true));
|
||||
if (!inserted)
|
||||
{
|
||||
|
@ -449,6 +449,7 @@ bool ReadWriteBufferFromHTTP::nextImpl()
|
||||
if (http_skip_not_found_url && e.getHTTPStatus() == Poco::Net::HTTPResponse::HTTPStatus::HTTP_NOT_FOUND)
|
||||
{
|
||||
next_result = false;
|
||||
has_not_found_url = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -740,4 +741,3 @@ ReadWriteBufferFromHTTP::HTTPFileInfo ReadWriteBufferFromHTTP::parseFileInfo(con
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,7 @@ private:
|
||||
|
||||
const bool use_external_buffer;
|
||||
const bool http_skip_not_found_url;
|
||||
bool has_not_found_url = false;
|
||||
|
||||
std::function<void(std::ostream &)> out_stream_callback;
|
||||
|
||||
@ -183,6 +184,8 @@ public:
|
||||
|
||||
std::optional<time_t> tryGetLastModificationTime();
|
||||
|
||||
bool hasNotFoundURL() const { return has_not_found_url; }
|
||||
|
||||
HTTPFileInfo getFileInfo();
|
||||
static HTTPFileInfo parseFileInfo(const Poco::Net::HTTPResponse & response, size_t requested_range_begin);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user