Skip to content

Commit 9179fc8

Browse files
authored
Merge pull request #20226 from ClickHouse/fix_race_in_system_parts
Fix benign race in system.parts
2 parents 253c72a + 8da9f15 commit 9179fc8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Storages/System/StorageSystemParts.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ void StorageSystemParts::processNextStorage(MutableColumns & columns_, const Sto
193193
add_ttl_info_map(part->ttl_infos.rows_where_ttl);
194194

195195
/// _state column should be the latest.
196+
/// Do not use part->getState*, it can be changed from different thread
196197
if (has_state_column)
197-
columns_[i++]->insert(part->stateString());
198+
columns_[i++]->insert(IMergeTreeDataPart::stateToString(part_state));
198199
}
199200
}
200201

0 commit comments

Comments
 (0)