Did i successfully change retention policy?



I’ve created a database without any retention policy. A bit later i decided to add one so i ran the command:

>create retention policy "2day" on "substation" DURATION 2d  REPLICATION 1

And then when i run:

> show retention policies;
name    duration shardGroupDuration replicaN default
----    -------- ------------------ -------- -------
autogen 0s       168h0m0s           1        true
2day    48h0m0s  24h0m0s            1        false

This isn’t clear enough to me - is my new RP active, how does this exactly work? I wonder because the “default” is set to false.


Please view the documentation:

If you are changing the default policy - you need to use the alter command (rather than create). If you are creating a new default policy; the command should end with the default keyword like:

create retention policy “2day” on “substation” DURATION 2d REPLICATION 1 default