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

[0.12] Duplicate CREATE DATABASE with change in SHARD DURATION fails silently #6153

Closed
rkuchan opened this issue Mar 29, 2016 · 0 comments
Closed
Assignees
Milestone

Comments

@rkuchan
Copy link
Contributor

rkuchan commented Mar 29, 2016

As expected, when I duplicate a database and retention policy I receive no error:

> CREATE DATABASE mydb WITH DURATION 1d REPLICATION 1 SHARD DURATION 30m NAME myrp
> CREATE DATABASE mydb WITH DURATION 1d REPLICATION 1 SHARD DURATION 30m NAME myrp
>

Also as expected, when I create the same database and retention policy but change REPLICATION or DURATION, I receive an error:

> CREATE DATABASE mydb WITH DURATION 1d REPLICATION 1 SHARD DURATION 30m NAME myrp
> CREATE DATABASE mydb WITH DURATION 1d REPLICATION 2 SHARD DURATION 30m NAME myrp
ERR: retention policy conflicts with an existing policy
> CREATE DATABASE mydb WITH DURATION 2d REPLICATION 1 SHARD DURATION 30m NAME myrp
ERR: retention policy conflicts with an existing policy

I do not receive an error if I create the same database and retention policy but change the SHARD DURATION, and the retention policy's SHARD DURATION remains the initial duration:

> CREATE DATABASE mydb WITH DURATION 1d REPLICATION 1 SHARD DURATION 30m NAME myrp
> CREATE DATABASE mydb WITH DURATION 1d REPLICATION 1 SHARD DURATION 40m NAME myrp
> show retention policies on mydb
name    duration    shardGroupDuration  replicaN    default
myrp    24h0m0s     30m0s               1           true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants