Skip to content

Conversation

abhijat
Copy link
Contributor

@abhijat abhijat commented Oct 16, 2025

When using epoll as the event loop in debug mode, it can be observed that the stream consumption fiber in stable state can monopolize the core allowing no other fibers to run. This causes CI failures when running on epoll + debug + single proactor thread.

To avoid this a yield is added similar to ListenerInterface::RunAcceptLoop()

FIXES #4451

When using epoll as the event loop in debug mode, it has been observed
that the stream consumption from redis in stable state can monopolize
the core allowing no other fibers to run.

To avoid this a yield is added similar to

ListenerInterface::RunAcceptLoop()

Signed-off-by: Abhijat Malviya <[email protected]>
@abhijat abhijat force-pushed the abhijat/fix/epoll-socket-yield-during-repl branch from 9fb586c to 77fdbb3 Compare October 16, 2025 11:24
@abhijat abhijat marked this pull request as ready for review October 16, 2025 11:49
Comment on lines +701 to +704
// Yield if the fiber has been running for long.
if (base::CycleClock::ToUsec(ThisFiber::GetRunningTimeCycles()) > 1000) { // 1ms
ThisFiber::Yield();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not clear what tests to add for this, perhaps #4451 not failing (or continuing to fail) is a test

@abhijat abhijat merged commit 3b61568 into main Oct 16, 2025
10 checks passed
@abhijat abhijat deleted the abhijat/fix/epoll-socket-yield-during-repl branch October 16, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_redis_replication_all fails

3 participants