influxdata / influxdata/influxdb

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

Open
#9,432 16 comments 4 reactions 0 assignees View on GitHub
1.x
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

### 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 `.

__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.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the retention-policy change described in the issue on InfluxDB 1.4.2, then read the linked database-management documentation and inspect the retention-policy handling it points to. Done means existing data remains queryable after changing the default policy, and the documentation clearly explains how to change the default without hiding older data.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.