mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add warning message
This commit is contained in:
parent
42c358aa3c
commit
f0c8998471
@ -613,27 +613,39 @@ static void sanityChecks(Server & server)
|
||||
{
|
||||
if (getAvailableMemoryAmount() < (2l << 30))
|
||||
server.context()->addWarningMessage("Available memory at server startup is too low (2GiB).");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!enoughSpaceInDirectory(data_path, 1ull << 30))
|
||||
server.context()->addWarningMessage("Available disk space for data at server startup is too low (1GiB): " + String(data_path));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!logs_path.empty())
|
||||
{
|
||||
auto logs_parent = fs::path(logs_path).parent_path();
|
||||
if (!enoughSpaceInDirectory(logs_parent, 1ull << 30))
|
||||
server.context()->addWarningMessage("Available disk space for logs at server startup is too low (1GiB): " + String(logs_parent));
|
||||
}
|
||||
|
||||
if (server.context()->getMergeTreeSettings().allow_remote_fs_zero_copy_replication)
|
||||
{
|
||||
server.context()->addWarningMessage("The setting 'allow_remote_fs_zero_copy_replication' is enabled for MergeTree tables."
|
||||
" But the feature of 'zero-copy replication' is under development and is not ready for production."
|
||||
" The usage of this feature can lead to data corruption and loss. The setting should be disabled in production.");
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
|
||||
if (server.context()->getMergeTreeSettings().allow_remote_fs_zero_copy_replication)
|
||||
{
|
||||
server.context()->addWarningMessage("The setting 'allow_remote_fs_zero_copy_replication' is enabled for MergeTree tables."
|
||||
" But the feature of 'zero-copy replication' is under development and is not ready for production."
|
||||
" The usage of this feature can lead to data corruption and loss. The setting should be disabled in production.");
|
||||
}
|
||||
}
|
||||
|
||||
int Server::main(const std::vector<std::string> & /*args*/)
|
||||
|
Loading…
Reference in New Issue
Block a user