FUXA icon indicating copy to clipboard operation
FUXA copied to clipboard

BUG - InfluxDB Creating duplicate records !

Open tayfunonbasioglu opened this issue 2 years ago • 3 comments

When a new record information comes, it saves again with the previous record. Therefore, 4 records are created for 2 Tags in the same time period.

image

tayfunonbasioglu avatar Sep 23 '22 21:09 tayfunonbasioglu

Hi, thanks for the report. it would be useful to know if the same problem occurs with the same configuration but on sqlite.

unocelli avatar Sep 24 '22 08:09 unocelli

Hi , sqlite no problem.

image

tayfunonbasioglu avatar Sep 24 '22 13:09 tayfunonbasioglu

Hi, I suppose you have a polling interval smaller than 1 second and the reason is that timestamp in influxdb is truncate in seconds (you see the number of digits in sqlite are 13). I checked and I see that the value are write in db after a conversion from milliseconds to Date...

function writePoint(tag, deviceName) { const point = new Point(tag.id) .tag('name', tag.name) .tag('type', tag.type) .timestamp(new Date(tag.timestamp)); writeApi.writePoint(point); }

unocelli avatar Sep 25 '22 14:09 unocelli

How do you query the data? I open the .db file and it's empty image

haitan981 avatar Nov 25 '22 04:11 haitan981

@haitan981 you have to enable the storage of tags data

unocelli avatar Feb 05 '23 17:02 unocelli