Closed romange closed 1 year ago
So, I'm not sure I follow about the exact reason for the high CPU: it seems we would never execute
ProcessSleep
? But why would that create high CPU usage?I'm wondering if we might have a similar bug for clock adjustments.
I fixed the root cause. The bug that caused the elevated CPU usage is here: https://github.com/romange/helio/blob/master/util/fibers/uring_proactor.cc#L631-L638
scheduler->NextSleepPoint()
is in the past (because it never gets processed), therefore ts_arg
points to zero interval causing wait_for_cqe
to constantly spin.
Ah, clever LOG_FIRST usage :)
Addresses https://github.com/dragonflydb/dragonfly/issues/1705