-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guard against system clock moving backwards. #3679
Conversation
f7b65bb
to
d5daf2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @kormat and @sgmonroy)
go/lib/overlay/conn/conn.go, line 319 at r1 (raw file):
// Guard against the system clock moving backwards. if meta.Recvd.After(readTime) { meta.Recvd = readTime
Just note to self: this is done because meta.Recvd
is effectively `rp.TimeIn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
The timestamp returned from the kernel is in system time. This means it's possible for the kernel received time to appear after the application receives the packet, which then can cause logic errors to occur in code that depends on the ordering of these timestamps. Also guard against this in the BR's packet processing time metric calculation, as system time could move backwards during the processing of a packet.
219ae4b
to
d0ae765
Compare
The timestamp returned from the kernel is in system time. This means it's possible for the kernel received time to appear after the application receives the packet, which then can cause logic errors to occur in code that depends on the ordering of these timestamps. Also guard against this in the BR's packet processing time metric calculation, as system time could move backwards during the processing of a packet.
The timestamp returned from the kernel is in system time. This means
it's possible for the kernel received time to appear after the
application receives the packet, which then can cause logic errors to
occur in code that depends on the ordering of these timestamps.
Also guard against this in the BR's packet processing time metric
calculation, as system time could move backwards during the processing
of a packet.
This change is