Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
lzydmxy committed Jun 18, 2024
1 parent 663eddc commit 04673d7
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/Service/RequestProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,26 +302,37 @@ std::unordered_set<int64_t> RequestProcessor::processCommittedRequest(size_t com
{
if (!pending_requests.contains(committed_request.session_id)
|| pending_requests[committed_request.session_id].empty()
|| pending_requests[committed_request.session_id].front().request->isReadRequest()
)
{
if (committed_request.request->getOpNum() == Coordination::OpNum::Close)
{
LOG_DEBUG(log, "Commit request got, but not in pending_requests,"
"it's close requests from deadSessionCleanThread");

applyRequest(committed_request);
committed_queue.pop();
continue;
}
if (!pending_requests.contains(committed_request.session_id))
{
LOG_DEBUG(log, "Commit request got, but not in pending_requests");
}
else if (pending_requests[committed_request.session_id].empty())
{
LOG_DEBUG(log, "Commit request got, but pending_requests empty");
}
else
{
LOG_DEBUG(log, "Commit request got, but next pending_request {}", pending_requests[committed_request.session_id].front().toSimpleString());
LOG_DEBUG(log, "Commit request got, but pending_requests is empty, it's a Bug");
}

break;
}

/// apply request
// Pending reads
if (pending_requests[committed_request.session_id].front().request->isReadRequest())
{
LOG_DEBUG(log, "Commit request got, but next pending_request {}",
pending_requests[committed_request.session_id].front().toSimpleString());
break;
}

applyRequest(committed_request);

committed_queue.pop();
Expand Down

0 comments on commit 04673d7

Please sign in to comment.