MaxGekk opened a new pull request #23727: [SPARK-26817][CORE] Use 
System.nanoTime to measure time intervals
URL: https://github.com/apache/spark/pull/23727
 
 
   ## What changes were proposed in this pull request?
   
   In the PR, I propose to use `System.nanoTime()` instead of 
`System.currentTimeMillis()` in measurements of time intervals.
   
   `System.currentTimeMillis()` returns current wallclock time and will follow 
changes to the system clock. Thus, negative wallclock adjustments can cause 
timeouts to "hang" for a long time (until wallclock time has caught up to its 
previous value again). This can happen when ntpd does a "step" after the 
network has been disconnected for some time. The most canonical example is 
during system bootup when DHCP takes longer than usual. This can lead to 
failures that are really hard to understand/reproduce. `System.nanoTime()` is 
guaranteed to be monotonically increasing irrespective of wallclock changes.
   
   ## How was this patch tested?
   
   By existing test suites.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to