I am running out of disk space, and was curious as to why, and noticed that for some reason the retention policy that I created originally didn’t “work”. So I created a new one, and it also didn’t “apply” to the database.
What am I doing wrong here?
Honestly, I’ve never used the
settings command to check RPs so I’m not sure of the output it gives.
I suggest you run
SHOW RETENTION POLICIES, it will return all the details about the RPs you have.
I suspect you will find the autogen RP with a duration of 0 (meaning infinite) as the default one.
You can create as many RPs as you want, but you must specify which one to use when you write the data (especially if you have multiple RPs), if the RP is not specified the default one will be used (the same is valid when you reading the data).
The easiest way is probably to alter the current default RP and give it retention.
if instead, you want to actually use a different RP you will have to:
Alter an existing RP and set it as DEFAULT
- Move the data from the RP you have been using to the new “default” one
- Drop the unnecessary RPs
- Change references in CQs, queries, etc if needed