influxdb: Changing the default retention policy causes missing data from before the change

Bug report

System info: Ubuntu 16.04, Influxdb 1.4.2-1

Steps to reproduce:

  1. Create a database and store some data in it.
  2. Create a retention policy such as create retention policy "56_weeks" on telegraf duration 56w replication 1 default
  3. Add some more data.
  4. Try something simple like select * from <series>.

Expected behavior: All data should be returned.

Actual behavior: Only data added since the retention policy has been added is shown.

Additional info: Changing the default retention policy back to the previous policy will fix the issue. However, this is a pretty poor admin experience as at first glance it looks like you have to restore from a backup. Also, it’s unclear how to set a new default retention policy as the docs don’t mention anything about modifying the autogen policy, just renaming it.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 4
  • Comments: 16

Most upvoted comments

Just wanted to say that this is a cardiac arrest inducing bug. Imaging creating a new retention policy to ensure you get more data only to find that all of your data appears to be gone. If it’s not going to be fixed this behavior should at least be mentioned in the documentation for retention policies.

This is still an issue, dont want to export/import 100G. Would be really helpful to be able to change the RP either in backup or restore.