From 8ffbe4b02fdc3c810a81a50b2cabc8a2492b7f6b Mon Sep 17 00:00:00 2001 From: Hanqing Wu Date: Tue, 12 Dec 2023 11:08:44 +0800 Subject: [PATCH] Revert "fix metaserver deadlock caused by bthread coroutine switching" This reverts commit d0cd3fc3b7d5b61ccd53e2f3f3f3c07b0cb8d825. Signed-off-by: Hanqing Wu --- curvefs/src/metaserver/partition.cpp | 7 +------ curvefs/test/metaserver/copyset/raft_cli_service2_test.cpp | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/curvefs/src/metaserver/partition.cpp b/curvefs/src/metaserver/partition.cpp index 872a836d1f..50b97a35bf 100644 --- a/curvefs/src/metaserver/partition.cpp +++ b/curvefs/src/metaserver/partition.cpp @@ -82,12 +82,7 @@ Partition::Partition(PartitionInfo partition, } if (partitionInfo_.status() != PartitionStatus::DELETING) { - auto handle = std::async(std::launch::async, [&]() { - TrashManager::GetInstance().Add( - partitionInfo_.partitionid(), trash); - }); - handle.wait(); - + TrashManager::GetInstance().Add(partitionInfo_.partitionid(), trash); if (startCompact) { StartS3Compact(); } diff --git a/curvefs/test/metaserver/copyset/raft_cli_service2_test.cpp b/curvefs/test/metaserver/copyset/raft_cli_service2_test.cpp index 09dc39c3dc..a3e037074c 100644 --- a/curvefs/test/metaserver/copyset/raft_cli_service2_test.cpp +++ b/curvefs/test/metaserver/copyset/raft_cli_service2_test.cpp @@ -472,7 +472,7 @@ TEST_F(RaftCliService2Test, ChangePeerTest) { // change peer succeed { - // sleep(60); + sleep(60); ChangePeersRequest2 request; ChangePeersResponse2 response; SetRequestPoolAndCopysetId(&request);