v.19.14Improvement
When Enable Dumping Temporary Data to the Disk to Restrict Memory Usage During GROUP By, ORDER By, It Didn't Check the Free Disk Space
When enable dumping temporary data to the disk to restrict memory usage duringGROUP BY,ORDER BY, it didn't check the free disk space. The fix add a new settingmin_free_disk_space, when the free disk space it smaller then the threshold, the query will stop and throwErrorCodes::NOT_ENOUGH_SPACE. #6678 (Weiqing Xu) #6691 (alexey-milovidov)
Why it matters
When disk dumping is enabled to limit memory usage duringGROUP BY and ORDER BY operations, there was no check for available free disk space. This could lead to disk space exhaustion and system instability. The new setting min_free_disk_space prevents this by enforcing a minimum free disk space threshold; if free space drops below this threshold, the query is stopped with an ErrorCodes::NOT_ENOUGH_SPACE error. This protects the system from running out of disk space during query execution.How to use it
Users can enable this feature by setting the configuration parametermin_free_disk_space to the desired minimum free disk space in bytes. When enabled, if the available free disk space falls below this limit during dumping of temporary data for GROUP BY or ORDER BY operations, the query execution will be stopped with an error indicating insufficient disk space.