app/vminsert/influx: round automatically generated timestamp according to the given precision arg

This commit is contained in:
Aliaksandr Valialkin 2019-08-02 00:24:06 +03:00
parent ade7bc30db
commit 8ed84a4713

View file

@ -176,6 +176,7 @@ func (ctx *pushCtx) Read(r io.Reader, tsMultiplier int64) bool {
}
} else if tsMultiplier < 0 {
tsMultiplier = -tsMultiplier
currentTs -= currentTs % tsMultiplier
for i := range ctx.Rows.Rows {
row := &ctx.Rows.Rows[i]
if row.Timestamp == 0 {