Skip to content

Commit

Permalink
Revert "fix metaserver deadlock caused by bthread coroutine switching"
Browse files Browse the repository at this point in the history
This reverts commit d0cd3fc.

Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
  • Loading branch information
wu-hanqing committed Dec 12, 2023
1 parent f233132 commit 8ffbe4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions curvefs/src/metaserver/partition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion curvefs/test/metaserver/copyset/raft_cli_service2_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ TEST_F(RaftCliService2Test, ChangePeerTest) {

// change peer succeed
{
// sleep(60);
sleep(60);
ChangePeersRequest2 request;
ChangePeersResponse2 response;
SetRequestPoolAndCopysetId(&request);
Expand Down

0 comments on commit 8ffbe4b

Please sign in to comment.