Stop using UTC for time in flushClients (#4132)

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
(e5646b23de),
so it can be prone to clock skews when subtracting time in other areas
of the code.
This commit is contained in:
Waldemar Quevedo
2023-05-04 17:35:50 -07:00
committed by GitHub

View File

@@ -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 {