You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALTER RETENTION POLICY throws a parsing error if shard duration and default co-exist in the statement.
As a result of the combination of this and issue 7150 which describes that the ALTER statement resets shard duration when not explicitly defined, the impact is :
two ALTER statements are needed to set a new default RP with custom shard duration (workaround: set all parameters during CREATE RETENTION POLICY)
in order to switch the default RP while maintaining a custom shard duration, the ALTER ... default statement needs to go first, followed by ALTER ... shard duration.
If the statements are given in the opposite order, the custom shard duration will be overwritten.
the ALTER statement as documented in 1.0 docs does not work.
InfluxDB shell version: 1.0.0~rc1
> create database mytest
> show retention policies on mytest
name duration shardGroupDuration replicaN default
autogen 0 168h0m0s 1 true
> use mytest
Using database mytest
> alter retention policy autogen on mytest duration 720h replication 1 shard duration 168h default
ERR: error parsing query: found DEFAULT, expected ; at line 1, char 90
> alter retention policy autogen on mytest duration 720h replication 1 shard duration 168h
> show retention policies on mytest
name duration shardGroupDuration replicaN default
autogen 720h0m0s 168h0m0s 1 true
> alter retention policy autogen on mytest duration 720h replication 1 default
> show retention policies on mytest
name duration shardGroupDuration replicaN default
autogen 720h0m0s 24h0m0s 1 true
The text was updated successfully, but these errors were encountered:
ALTER RETENTION POLICY
throws a parsing error ifshard duration
anddefault
co-exist in the statement.As a result of the combination of this and issue 7150 which describes that the
ALTER
statement resets shard duration when not explicitly defined, the impact is :ALTER
statements are needed to set a new default RP with custom shard duration (workaround: set all parameters duringCREATE RETENTION POLICY
)ALTER ... default
statement needs to go first, followed byALTER ... shard duration
.If the statements are given in the opposite order, the custom shard duration will be overwritten.
ALTER
statement as documented in 1.0 docs does not work.The text was updated successfully, but these errors were encountered: