mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
fix
This commit is contained in:
parent
66ac187b7c
commit
8a49c1614e
@ -1,4 +1,5 @@
|
||||
#include <Core/ServerUUID.h>
|
||||
#include <Interpreters/Context.h>
|
||||
#include <IO/ReadBufferFromFile.h>
|
||||
#include <IO/WriteBufferFromFile.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
@ -16,7 +17,9 @@ namespace ErrorCodes
|
||||
|
||||
UUID ServerUUID::get()
|
||||
{
|
||||
if (server_uuid == UUIDHelpers::Nil)
|
||||
if (server_uuid == UUIDHelpers::Nil &&
|
||||
(Context::getGlobalContextInstance()->getApplicationType() == Context::ApplicationType::SERVER ||
|
||||
Context::getGlobalContextInstance()->getApplicationType() == Context::ApplicationType::KEEPER))
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "ServerUUID is not initialized yet");
|
||||
return server_uuid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user