Skip to content

Commit d62c349

Browse files
Backport ClickHouse#92748 to 25.8: Do not attempt to delete temporary directories at startup if a MergeTree table is created over a readonly disk
1 parent 83f2ac4 commit d62c349

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Storages/StorageMergeTree.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ StorageMergeTree::StorageMergeTree(
192192

193193
void StorageMergeTree::startup()
194194
{
195+
/// Do not schedule any background jobs if current storage has static data files.
196+
if (isStaticStorage())
197+
return;
198+
195199
clearEmptyParts();
196200

197201
/// Temporary directories contain incomplete results of merges (after forced restart)
@@ -202,10 +206,6 @@ void StorageMergeTree::startup()
202206
time_after_previous_cleanup_parts.restart();
203207
time_after_previous_cleanup_temporary_directories.restart();
204208

205-
/// Do not schedule any background jobs if current storage has static data files.
206-
if (isStaticStorage())
207-
return;
208-
209209
try
210210
{
211211
background_operations_assignee.start();

0 commit comments

Comments
 (0)