-
Notifications
You must be signed in to change notification settings - Fork 178
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
alterRetentionPolicy does not support SHARD DURATION #530
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Can anyone offer some input on this issue please? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
is noone interested in this or can even tell me whether this will be fixed? |
Hi @technicallyfeasible, I'm afraid I don't have the bandwidth to look into this, I'd happily review a PR but will not be working on it myself. I'd recommend moving onto using the official InfluxDB JS Client maintained by InfluxData if you're wanting a commercially supported library. https://github.com/influxdata/influxdb-client-js |
thanks for the reply. I will have a look at the official library. Not sure why I didn't use it in the first place but maybe it wasn't available when I started working on my project. |
Expected Behavior
According to the InfluxDB documentation it is supported to change the shard group duration when altering a retention policy:
ALTER RETENTION POLICY <retention_policy_name> ON <database_name> DURATION <duration> REPLICATION <n> SHARD DURATION <duration> DEFAULT
(https://docs.influxdata.com/influxdb/v1.8/query_language/manage-database/#modify-retention-policies-with-alter-retention-policy)
This leads to the problematic situation that if a retention policy has been created with a very long shard duration, it is impossible to change later since an error will be returned saying:
"retention policy duration must be greater than the shard duration"
Actual Behavior
This does not seem to be implemented in the library.
Specifications
This was tested with InfluxDB version 1.8
influx library version 5.6.3
Suggested change
I suggest to support a property
shardGroupDuration
for RetentionOptions as well as changing alterRetentionPolicy to something like:The function createRetentionPolicy should probably be adapted as well.
I can have a stab at creating a merge request if noone is available to implement this in a timely manner.
The text was updated successfully, but these errors were encountered: