diff --git a/dbms/src/Storages/DeltaMerge/DeltaIndex.h b/dbms/src/Storages/DeltaMerge/DeltaIndex.h index 8c83a0d03fa..9eda0b75870 100644 --- a/dbms/src/Storages/DeltaMerge/DeltaIndex.h +++ b/dbms/src/Storages/DeltaMerge/DeltaIndex.h @@ -145,10 +145,13 @@ class DeltaIndex String toString() { - std::stringstream s; - s << "{placed rows:" << placed_rows << ", deletes:" << placed_deletes << ", delta tree: " << delta_tree->numEntries() << "|" - << delta_tree->numInserts() << "|" << delta_tree->numDeletes() << "}"; - return s.str(); + std::scoped_lock lock(mutex); + return fmt::format("", + placed_rows, + placed_deletes, + delta_tree->numEntries(), + delta_tree->numInserts(), + delta_tree->numDeletes()); } UInt64 getId() const { return id; }