From 83363c2e30c2807d1dfd997873cfc52fc350483b Mon Sep 17 00:00:00 2001 From: jinhelin Date: Mon, 19 Sep 2022 22:31:02 +0800 Subject: [PATCH 1/2] This is an automated cherry-pick of #5948 Signed-off-by: ti-chi-bot --- dbms/src/Storages/DeltaMerge/DeltaIndex.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dbms/src/Storages/DeltaMerge/DeltaIndex.h b/dbms/src/Storages/DeltaMerge/DeltaIndex.h index 8c83a0d03fa..2b66f989799 100644 --- a/dbms/src/Storages/DeltaMerge/DeltaIndex.h +++ b/dbms/src/Storages/DeltaMerge/DeltaIndex.h @@ -145,10 +145,20 @@ class DeltaIndex String toString() { +<<<<<<< HEAD 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()); +>>>>>>> f01f4b1ad7 (Fix data race of DeltaIndex::toString (#5948)) } UInt64 getId() const { return id; } From c7f305e32e6fcd177980381181bf1d31c3cf365c Mon Sep 17 00:00:00 2001 From: jinhelin Date: Sun, 9 Oct 2022 17:48:11 +0800 Subject: [PATCH 2/2] Resolve conflict. --- dbms/src/Storages/DeltaMerge/DeltaIndex.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dbms/src/Storages/DeltaMerge/DeltaIndex.h b/dbms/src/Storages/DeltaMerge/DeltaIndex.h index 2b66f989799..9eda0b75870 100644 --- a/dbms/src/Storages/DeltaMerge/DeltaIndex.h +++ b/dbms/src/Storages/DeltaMerge/DeltaIndex.h @@ -145,12 +145,6 @@ class DeltaIndex String toString() { -<<<<<<< HEAD - 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, @@ -158,7 +152,6 @@ class DeltaIndex delta_tree->numEntries(), delta_tree->numInserts(), delta_tree->numDeletes()); ->>>>>>> f01f4b1ad7 (Fix data race of DeltaIndex::toString (#5948)) } UInt64 getId() const { return id; }