Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Databases/DataLake/RestCatalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1994,8 +1994,9 @@ void RestCatalog::createNamespaceIfNotExists(const String & namespace_name, cons
}
catch (const DB::HTTPException & e)
{
/// Lost the race to a concurrent creator.
if (e.getHTTPStatus() != Poco::Net::HTTPResponse::HTTPStatus::HTTP_CONFLICT)
if (e.getHTTPStatus() == Poco::Net::HTTPResponse::HTTP_CONFLICT)
LOG_DEBUG(log, "Namespace {} already exists", namespace_name);
else
throw;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/IO/HTTPCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ bool isRetriableHTTPError(const Poco::Net::HTTPResponse::HTTPStatus http_status)
Poco::Net::HTTPResponse::HTTPStatus::HTTP_NOT_FOUND,
Poco::Net::HTTPResponse::HTTPStatus::HTTP_FORBIDDEN,
Poco::Net::HTTPResponse::HTTPStatus::HTTP_NOT_IMPLEMENTED,
Poco::Net::HTTPResponse::HTTPStatus::HTTP_METHOD_NOT_ALLOWED};
Poco::Net::HTTPResponse::HTTPStatus::HTTP_METHOD_NOT_ALLOWED,
Poco::Net::HTTPResponse::HTTPStatus::HTTP_CONFLICT};

return std::all_of(
non_retriable_errors.begin(), non_retriable_errors.end(), [&](const auto status) { return http_status != status; });
Expand Down
Loading