You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Spark] InCommitTimestamp: Use clock.currentTimeMillis() instead of nanoTime() in commitLarge (#3111)
## Description
We currently use NANOSECONDS.toMillis(System.nanoTime()) for generating
the ICT when `commitLarge` is called. However, this usage of
System.nanoTime() is not correct as it should only be used for measuring
time difference, not to get an approximate wall clock time. This leads
to scenarios where the ICT becomes very small (e.g. 1 Jan 1970)
sometimes because some systems return a very small number when
System.nanoTime() is called. This PR changes this so that
clock.getCurrentTimeMillis() is used instead.
## How was this patch tested?
Added a test case to ensure that `clock.getCurrentTimeMillis()` is being
used.
0 commit comments