Resubmit 'Update invalidate_query_response on dictionary startup'

This commit is contained in:
vdimir 2024-03-28 16:46:44 +01:00 committed by GitHub
parent b5b347e86f
commit 0b85d8570b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -996,6 +996,14 @@ private:
if (!new_object && !new_exception) if (!new_object && !new_exception)
throw Exception(ErrorCodes::LOGICAL_ERROR, "No object created and no exception raised for {}", type_name); throw Exception(ErrorCodes::LOGICAL_ERROR, "No object created and no exception raised for {}", type_name);
if (!info->object && new_object)
{
/// If we loaded the object for the first time then we should set `invalidate_query_response` to the current value.
/// Otherwise we will immediately try to reload the object again despite the fact that it was just loaded.
bool is_modified = new_object->isModified();
LOG_TRACE(log, "Object '{}' was{} modified", name, (is_modified ? "" : " not"));
}
/// Saving the result of the loading. /// Saving the result of the loading.
{ {
LoadingGuardForAsyncLoad lock(async, mutex); LoadingGuardForAsyncLoad lock(async, mutex);