-
Notifications
You must be signed in to change notification settings - Fork 320
fix(influxdb-v1): correct FUTURE LIMIT and PAST LIMIT clause order and add to ALTER RETENTION POLICY #6591
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
base: master
Are you sure you want to change the base?
Conversation
…d add to ALTER RETENTION POLICY - Fix clause order: FUTURE LIMIT must appear before PAST LIMIT (parser requirement) - Add FUTURE LIMIT and PAST LIMIT clauses to ALTER RETENTION POLICY syntax - Add grammar definitions for retention_future_limit and retention_past_limit - Add explicit note clarifying the required clause order - Fix "There are" style issue in spec.md closes #6590
influxdb/v1: - Simplify introduction and use relative anchor links - Convert notes to GitHub-style callout syntax - Fix heading hierarchy (Letters/digits, Identifiers, Keywords, Literals as h3) - Standardize Duration units table heading - Fix "keywords" typo - Reword "See FAQ" to "For more information, see" - Simplify KILL QUERY section - Fix SHOW MEASUREMENT CARDINALITY heading level - Replace "There are" with active voice enterprise_influxdb/v1: - Add related links to frontmatter - Simplify introduction and use relative anchor links - Convert notes to GitHub-style callout syntax - Add Characters and Letters/digits to TOC - Standardize Duration units table heading - Fix "keywords" typo - Reword "See FAQ" to "For more information, see" - Simplify KILL QUERY section for Enterprise clusters - Update SHOW TAG KEYS grammar to include with_key_clause - Remove backticks from SHOW STATS headings
| show_stats_stmt = "SHOW STATS [ FOR '<component>' | 'indexes' ]" | ||
| ``` | ||
|
|
||
| #### `SHOW STATS` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate heading. I rearranged the content to be consistent with Ent.
| - A multi-line comment begins with `/*` and ends with `*/`. This comment type can span several lines. | ||
| Multi-line comments do not support nested multi-line comments. | ||
|
|
||
| ## Query Engine Internals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're looking for this in Ent., it has a separate Internals page.
davidby-influx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, we have discovered a bug in ALTER RETENTION POLICY so, although it accepts FUTURE LIMIT and PAST LIMIT it does not persist them correctly.
So, let me rescind my request to add the syntax to the documentation for 1.12.2, and we can add it on the 1.12.3 release.
For 1.12.2, we could add a note that they are, in fact, not changeable. I hope to have this fixed by 1.12.3.
Sorry for my confusion.
| ### Modify retention policies with ALTER RETENTION POLICY | ||
|
|
||
| The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, or `DEFAULT`: | ||
| The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revert this change to keep customers from using limits in ALTER statements
| The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`: | ||
| ```sql | ||
| ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [DEFAULT] | ||
| ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [FUTURE LIMIT <duration>] [PAST LIMIT <duration>] [DEFAULT] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert, as noted above. Perhaps we want to add a note that limits are not changeable (which note we can then remove in 1.12.3).
| {{% /warn %}} | ||
|
|
||
| For information about the `FUTURE LIMIT` and `PAST LIMIT` clauses, see | ||
| [CREATE RETENTION POLICY](#create-retention-policies-with-create-retention-policy). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove for 1.12.2
| retention_policy_option | ||
| [ retention_policy_option ] | ||
| [ retention_policy_option ] | ||
| [ retention_policy_option ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove for 1.12.2
| ALTER RETENTION POLICY "policy1" ON "somedb" DURATION 1h REPLICATION 4 | ||
|
|
||
| -- Change future and past limits. | ||
| ALTER RETENTION POLICY "policy1" ON "somedb" FUTURE LIMIT 6h PAST LIMIT 6h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove for 1.12.2
| ### Modify retention policies with ALTER RETENTION POLICY | ||
|
|
||
| The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, or `DEFAULT`: | ||
| The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert for 1.12.2
| The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`: | ||
| ```sql | ||
| ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [DEFAULT] | ||
| ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [FUTURE LIMIT <duration>] [PAST LIMIT <duration>] [DEFAULT] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert for 1.12.2
| retention_policy_option | ||
| [ retention_policy_option ] | ||
| [ retention_policy_option ] | ||
| [ retention_policy_option ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove for 1.12.2
| ALTER RETENTION POLICY "policy1" ON "somedb" DURATION 1h REPLICATION 4 | ||
|
|
||
| -- Change future and past limits. | ||
| ALTER RETENTION POLICY "policy1" ON "somedb" FUTURE LIMIT 6h PAST LIMIT 6h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove for 1.12.2
| Tables can now be renamed and undeleted with [influxctl v2.10.5](https://docs.influxdata.com/influxdb3/clustered/reference/release-notes/influxctl/#2105) or later. | ||
| To enable hard delete of soft-deleted namespaces: | ||
| To enable hard delete of soft-deleted databases: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know anything about this.
Summary
FUTURE LIMITmust appear beforePAST LIMIT(parser requirement)FUTURE LIMITandPAST LIMITclauses toALTER RETENTION POLICYsyntax documentationretention_future_limitandretention_past_limitFiles changed
Retention policy fixes
content/influxdb/v1/query_language/manage-database.mdcontent/enterprise_influxdb/v1/query_language/manage-database.mdcontent/influxdb/v1/query_language/spec.mdcontent/enterprise_influxdb/v1/query_language/spec.mdTest plan
closes #6590