Address requested changes, improve documentation and fix code-style.

This commit is contained in:
marco-vb 2024-09-30 14:17:13 +01:00
parent 61ef8c6740
commit 4530957603
3 changed files with 6 additions and 3 deletions

View File

@ -1090,4 +1090,6 @@ Possible values:
- Float, 0.0 - 1.0
Default value: 0.0
Default value: 0.0
Note that if both `min_free_disk_ratio_to_perform_insert` and `min_free_disk_bytes_to_perform_insert` are specified, ClickHouse will count on the value that will allow to perform inserts on a bigger amount of free memory.

View File

@ -580,7 +580,7 @@ MergeTreeDataWriter::TemporaryPart MergeTreeDataWriter::writeTempPartImpl(
{
const auto & disk = data_part_volume->getDisk();
const UInt64 & total_disk_bytes = disk->getTotalSpace().value_or(0);
const UInt64 & free_disk_bytes = disk->getAvailableSpace().value_or(0.0);
const UInt64 & free_disk_bytes = disk->getAvailableSpace().value_or(0);
const UInt64 & min_bytes_from_ratio = static_cast<UInt64>(min_ratio_to_perform_insert * total_disk_bytes);
const UInt64 & needed_free_bytes = std::max(min_bytes_to_perform_insert, min_bytes_from_ratio);

View File

@ -1,6 +1,7 @@
import pytest
from helpers.cluster import ClickHouseCluster, ClickHouseInstance
from helpers.client import QueryRuntimeException
from helpers.cluster import ClickHouseCluster, ClickHouseInstance
cluster = ClickHouseCluster(__file__)