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
Google::Cloud::Spanner::Session#idle_since? uses an internal variable @last_updated_at to track the last change timestamp. This object is currently a Time object retrieved via Time.now, but it is never accessed directly, only in comparison with other Time objects to determine durations. For this purpose, it is better practice to use Process::clock_gettime(Process::CLOCK_MONOTONIC) which isn't sensitive to changes in the clock (e.g. due to time server updates).
We should also audit the rest of the code base to ensure there aren't other cases of this.
The text was updated successfully, but these errors were encountered:
Google::Cloud::Spanner::Session#idle_since?
uses an internal variable@last_updated_at
to track the last change timestamp. This object is currently aTime
object retrieved viaTime.now
, but it is never accessed directly, only in comparison with other Time objects to determine durations. For this purpose, it is better practice to useProcess::clock_gettime(Process::CLOCK_MONOTONIC)
which isn't sensitive to changes in the clock (e.g. due to time server updates).We should also audit the rest of the code base to ensure there aren't other cases of this.
The text was updated successfully, but these errors were encountered: