fix(write): Successful writes increment write error statistics incorrectly.
In v1.8.3 and earlier, the write path through (*PointsWriter) writeToShardWithContext() always increments the WriteErr count in the debug variables, and does not increment the WriteOK count. https://github.com/influxdata/influxdb/blob/v1.8.3/coordinator/points_writer.go line 450 should be an else if err != nil { instead of an else This has been reported in a customer cloud instance, and verified under a debugger. https://github.com/influxdata/influxdb/issues/20098pull/20100/head
parent
af00cb7bbd
commit
3d9f8b5020
|
@ -447,11 +447,10 @@ func (w *PointsWriter) writeToShardWithContext(ctx context.Context, shard *meta.
|
|||
atomic.AddInt64(&w.stats.WriteErr, 1)
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
} else if err != nil {
|
||||
atomic.AddInt64(&w.stats.WriteErr, 1)
|
||||
return err
|
||||
}
|
||||
|
||||
atomic.AddInt64(&w.stats.WriteOK, 1)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue