influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
29k stars 3.56k forks source link

Overwriting snapshots on server restart #25569

Closed jacksonrnewhouse closed 2 days ago

jacksonrnewhouse commented 3 days ago

Steps to reproduce: List the minimal actions needed to reproduce the behaviour.

  1. Start a locally running server.
  2. Write data to it until a snapshot file has been written.
  3. Restart the server.
  4. Query DB with SELECT count(*) FROM my_db.
  5. Restart the server again.
  6. Query DB with SELECT count(*) FROM my_db.

Expected behaviour: The two queries should return the same value Actual behaviour: The second query returns a smaller count than the first. Additionally, snapshot files are overwritten, no longer containing the parquet files hthey had.

Environment info: Running on OS X with additional args to shorten investigation loop. Config:

./target/quick-release/influxdb3 serve -v --object-store file --data-dir /influx-data  --host-id influx --gen1-duration 1m --wal-snapshot-size 5