cauchy1988 opened a new pull request, #2405: URL: https://github.com/apache/incubator-pegasus/pull/2405
## Problem In virtualized environments (e.g. Docker for Mac ARM64), `high_resolution_clock` may exhibit minor time regression, causing `chronograph::duration_ns()` to hit: ```cpp CHECK_GE(now, _start_time_ns); ``` and abort the process with a FATAL error. ## Root Cause Virtualized environments (especially Docker for Mac with ARM64) can have non-monotonic `high_resolution_clock` behavior, where `now < _start_time_ns` occurs briefly. This is a known issue with time virtualization in these environments. ## Fix Replace the hard `CHECK_GE` with graceful degradation: - If `now < _start_time_ns`, return 0 instead of crashing - Add rate-limited warning (1 per second per thread) to avoid log flooding on hot paths - Use `dsn_unlikely` hint since this is an exceptional case ## Testing Verified in Docker for Mac ARM64 development environment — the process no longer aborts and continues normal operation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
