Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion proxy/logging/LogObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include <algorithm>
#include <vector>
#include <thread>

static bool
should_roll_on_time(Log::RollingEnabledValues roll)
Expand Down Expand Up @@ -462,7 +463,9 @@ LogObject::_checkout_write(size_t *write_offset, size_t bytes_needed)
break;

case LogBuffer::LB_RETRY:
// no more room, but another thread should be taking care of creating a new buffer, so try again
// no more room, but another thread should be taking care of creating a new buffer, so yield to let
// the other thread finish, then try again
std::this_thread::yield();
break;

case LogBuffer::LB_BUFFER_TOO_SMALL:
Expand Down