Closed
Description
Bug report
Generated duplicate points (and their number increases with each subsequent SELECT) via a succession of INSERT, DELETE, INSERT, SELECT commands.
System info: InfluxDB 1.3.0 (the official docker image ran under Gentoo Linux with Docker version 17.05.0-ce, build 89658be)
Steps to reproduce:
- get InfluxDB docker image v1.3.0
docker pull influxdb:1.3.0
- start the image
docker run --name influxdb -p 8086:8086 -v influxdb:<your data dir> influxdb
- start the CLI
docker run --rm --link=influxdb -it influxdb influx -host influxdb
- paste the following commands into the CLI
DROP DATABASE test
CREATE DATABASE test
USE test
PRECISION rfc3339
-- insert a record
INSERT m,t1=VV\ #1,t2=V\ #3 per_hour=1 1468706400000000000
-- check that it is there
SELECT * FROM m
-- insert some records after that
INSERT m,t1=5600,t2=7884 per_hour=6061 1479264452000000000
INSERT m,t1=6025,t2=7188 per_hour=8370 1479956854000000000
INSERT m,t1=814,t2=376 per_hour=6594 1486464148000000000
-- check that they are all there
SELECT * FROM m
-- delete the last 3 records
DELETE FROM m WHERE time >= 1473699600000000000 AND time < 1489244400000000000
-- odd fix?
-- SELECT * FROM m
-- insert some more records where the deleted data was
INSERT m,t1=VV\ #2,t2=V\ #6 per_day=1 1487116800000000000
INSERT m,t1=VV\ #2,t2=V\ #7 per_day=1 1487116800000000000
INSERT m,t1=VV\ #3,t2=V\ #8 per_day=1 1487116800000000000
INSERT m,t1=VV\ #1,t2=V\ #10 per_day=1 1488240000000000000
INSERT m,t1=VV\ #4,t2=V\ #4 per_day=1 1488240000000000000
INSERT m,t1=VV\ #5,t2=V\ #9 per_day=1 1488240000000000000
-- select returns more records than inserted (duplicates)
SELECT * FROM m
-- the second select returns more records than the previous select
SELECT * FROM m
-- and so on ...
-- if the "odd fix?" SELECT line above is uncommented everything works fine ...
Expected behavior: Not to find any duplicate points in the SELECT results (at any time)
Actual behavior: Duplicate points found in the SELECT results; their number increases with each subsequent SELECT call
Additional info: Some similar code worked fine in 1.2.4