Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prohibit dropping the default retention policy #4053

Merged
merged 2 commits into from
Sep 9, 2015
Merged

Conversation

otoolep
Copy link
Contributor

@otoolep otoolep commented Sep 9, 2015

This is to prevents users from putting their system into an awkward
state. It is a policy that all databases must have at least a default
retention policy.

Fixes issue #3699.

This is to prevents users from putting their system into an awkward
state. It is a policy that all databases must have at least a default
retention policy.

Fixes issue #3699.
@otoolep
Copy link
Contributor Author

otoolep commented Sep 9, 2015

@dgnorton

@otoolep otoolep added this to the 0.9.4 milestone Sep 9, 2015
@otoolep otoolep self-assigned this Sep 9, 2015
@@ -172,6 +172,11 @@ func (data *Data) DropRetentionPolicy(database, name string) error {
return ErrDatabaseNotFound
}

// Prohibit dropping the default retention policy.
if di.DefaultRetentionPolicy == name {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this ever be case sensitive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retention policy names are already case sensitive, so this just continues with this policy. If we ever change that, we'll need to change a lot more code.

@corylanou
Copy link
Contributor

One question, otherwise +1

@dgnorton
Copy link
Contributor

dgnorton commented Sep 9, 2015

+1

otoolep added a commit that referenced this pull request Sep 9, 2015
Prohibit dropping the default retention policy
@otoolep otoolep merged commit c1f232b into master Sep 9, 2015
@otoolep otoolep deleted the dont_delete_default branch September 9, 2015 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants