Depending on the host-dependent PerformanceCounter frequency, the calculation
in rd_clock() may wrap after 7 days of uptime.
Since rd_clock() is assumed to be a monotonic clock this wrap will lead to timers, timeouts, etc, stop working.
Original .NET issue: https://github.com/confluentinc/confluent-kafka-dotnet/issues/603
Introduced in v0.11.5
@edenhill thanks for the fix. Is there any ETA for a librdkafka.redist release?
We'll start the release cycle with an RC later this week, with a final release late next the earliest.
I've just found the issue.
May be below fix little more clean (I didn't check it):
return (now.QuadPart / freq.QuadPart) * 1000000 + ((now.QuadPart % freq.QuadPart) * 1000000) / freq.QuadPart;
**move from #998
Is there a problem with the existing fix?
I believe* existing fix solves the issue, but I just don't like convert int to double and back, because it's slower and not so accurate as integer.
*I need a time to make internal release to recheck it.
All works fine. Thank you.
Hmmm, existing fix almost two times faster of mine. Thank you for this.