Duplicate values stored in database

We are in the final stage of going live with InfluxDB as our time series database but at the last moment, I ran into one critical issue about duplicate points being stored for single timestamp-tag pair.

> SELECT "time", "2001", "SensorId" FROM dbname.autogen.Reading WHERE "SensorId" = '17186' AND time >= 1557953095198000000 and time <= 1557953103853000000 GROUP BY "SensorId";
name: Reading
tags: SensorId=17186
time                2001              SensorId
----                ----              --------
1557953099000000000 330638950.4       17186
1557953099000000000 330967451.0651455 17186

Influx Version: 1.7.4

Actual Behaviour
Duplicate field values stored for one tag and timestamp pair.

Expected Behaviour
The value should have override and only one value should have present.

a) Do you get the same result without the “group by SensorId”?

b) What are you using for “precision”?

Antony.

Yep same result without group by

> SELECT "time", "2001", "SensorId" FROM dbname.autogen.Reading WHERE "SensorId" = '17186' AND time >= 1557953095198000000 and time <= 1557953103853000000;
name: Reading
time                2001              SensorId
----                ----              --------
1557953099000000000 330638950.4       17186
1557953099000000000 330967451.0651455 17186

And it’s using nano second precision.

Hi @HardikSondagar ,

I am sure 2001 is a field but could you double check with show tag keys from Reading ?
Do you overwrite many times ?

best regards ,

Yes, 2001 is field, I’ve verified this by field keys

> SHOW FIELD KEYS ON "dbname" FROM "Reading"
name: Reading
fieldKey fieldType
-------- ---------
2001     float
2022     float
2030     float
2118     float
2119     float

Yes I’m overwriting data for 2-3 times. As our data doesn’t comes realtime always, sometimes because of network issue, we receive data after 2-3 days, so need to re-downsample every day for last 2-3 days.

Could be an unknown bug ,
are you using tsi1 indexes ?
Can you reproduce the situation on a new database or can you rebuild the indexes on a copy of your database ?

It’s kinda scary situation, I’m about to go live with influxdb in production but this is a serious bug.

Yes, I’m using tsi1 indexes and will try to reproduce the same on new database.