Skip to content

Commit

Permalink
Stop using UTC for time in flushClients (#4132)
Browse files Browse the repository at this point in the history
In #1943 it was adopted to use `UTC()` in some timestamps, but an
unintended side effect from this is that it strips the monotonic time
(golang/go@e5646b2),
so it can be prone to clock skews when subtracting time in other areas
of the code.
  • Loading branch information
wallyqs committed May 5, 2023
2 parents da8aeac + b886fed commit 40ea58f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/client.go
Expand Up @@ -1144,7 +1144,7 @@ func (c *client) writeLoop() {
// sent to during processing. We pass in a budget as a time.Duration
// for how much time to spend in place flushing for this client.
func (c *client) flushClients(budget time.Duration) time.Time {
last := time.Now().UTC()
last := time.Now()

// Check pending clients for flush.
for cp := range c.pcd {
Expand Down

0 comments on commit 40ea58f

Please sign in to comment.