mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
add logs for resource to disk mapping
This commit is contained in:
parent
9db958dcdc
commit
d57c28aa52
@ -104,11 +104,21 @@ DiskObjectStorage::DiskObjectStorage(
|
||||
{
|
||||
case ASTCreateResourceQuery::AccessMode::Read:
|
||||
{
|
||||
if (read_resource_name_from_config.empty())
|
||||
LOG_INFO(log, "Using resource '{}' for READ", resource_name);
|
||||
else
|
||||
LOG_INFO(log, "Resource '{}' should be used for READ, but it is overriden by config to resource '{}'",
|
||||
resource_name, read_resource_name_from_config);
|
||||
read_resource_name_from_sql = resource_name;
|
||||
break;
|
||||
}
|
||||
case ASTCreateResourceQuery::AccessMode::Write:
|
||||
{
|
||||
if (write_resource_name_from_config.empty())
|
||||
LOG_INFO(log, "Using resource '{}' for WRITE", resource_name);
|
||||
else
|
||||
LOG_INFO(log, "Resource '{}' should be used for WRITE, but it is overriden by config to resource '{}'",
|
||||
resource_name, write_resource_name_from_config);
|
||||
write_resource_name_from_sql = resource_name;
|
||||
break;
|
||||
}
|
||||
@ -119,9 +129,15 @@ DiskObjectStorage::DiskObjectStorage(
|
||||
else // DROP RESOURCE
|
||||
{
|
||||
if (read_resource_name_from_sql == resource_name)
|
||||
{
|
||||
LOG_INFO(log, "Stop using resource '{}' for READ", resource_name);
|
||||
read_resource_name_from_sql.clear();
|
||||
}
|
||||
if (write_resource_name_from_sql == resource_name)
|
||||
{
|
||||
LOG_INFO(log, "Stop using resource '{}' for WRITE", resource_name);
|
||||
write_resource_name_from_sql.clear();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user