Skip to content

Commit 755d9dc

Browse files
committed
Clarify row-level TTL rate limit doc
The rate limit is "per node per table" not "per leaseholder per table". Updating to reflect the server code.
1 parent 9597b74 commit 755d9dc

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

src/current/v23.2/row-level-ttl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ The settings that control the behavior of Row-Level TTL are provided using [stor
149149
| `ttl` <a name="param-ttl"></a> | Signifies if a TTL is active. Automatically set. | N/A |
150150
| `ttl_select_batch_size` | How many rows to [select]({% link {{ page.version.version }}/select-clause.md %}) at one time during the row expiration check. Defaults to the value of the associated cluster setting if unset. | `sql.ttl.default_select_batch_size` <br/> Default: 500. Minimum: 1. |
151151
| `ttl_delete_batch_size` <a name="param-ttl-delete-batch-size"></a> | How many rows to [delete]({% link {{ page.version.version }}/delete.md %}) at a time. Defaults to the value of the associated cluster setting if unset.| `sql.ttl.default_delete_batch_size` <br/> Default: 100. Minimum: 1. |
152-
| `ttl_select_rate_limit` | Maximum number of rows to be selected per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/> Note: The rate limit is applied per leaseholder per table. In practice, it will vary based on the number of [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-range) and [leaseholders]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-leaseholder). <br/> For example, if this variable is set to 500, and a table `public.foo` has its ranges spread across 3 leaseholders, then the cluster-wide rate limit for `public.foo` is 500 x 3 = 1500. <br/> To determine the number of leaseholders for some table `public.bar` on CockroachDB v23.1+, issue the following query against the output of [`SHOW RANGES ... WITH DETAILS`]({% link {{ page.version.version }}/show-ranges.md %}#show-ranges-for-a-table-with-details): <br/> `SELECT count(DISTINCT lease_holder) FROM [SHOW RANGES FROM TABLE public.bar WITH DETAILS];` | `sql.ttl.default_select_rate_limit` <br/> Default: 0. Minimum: 0 (unlimited).|
153-
| `ttl_delete_rate_limit` | Maximum number of rows to be deleted per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/> Note: The rate limit is applied per leaseholder per table. In practice, it will vary based on the number of [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-range) and [leaseholders]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-leaseholder). <br/> For example, if this variable is set to 500, and a table `public.foo` has its ranges spread across 3 leaseholders, then the cluster-wide rate limit for `public.foo` is 500 x 3 = 1500. <br/> To determine the number of leaseholders for some table `public.bar` on CockroachDB v23.1+, issue the following query against the output of [`SHOW RANGES ... WITH DETAILS`]({% link {{ page.version.version }}/show-ranges.md %}#show-ranges-for-a-table-with-details): <br/> `SELECT count(DISTINCT lease_holder) FROM [SHOW RANGES FROM TABLE public.bar WITH DETAILS];` | `sql.ttl.default_delete_rate_limit` <br/> Default: 100. Minimum: 0 (unlimited).|
152+
| `ttl_select_rate_limit` | Maximum number of rows to be selected per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/>Note: The rate limit is applied per node per table. The TTL job prefers to assign work to the leaseholder of each range, but this is not guaranteed. In some cases, non-leaseholder nodes may be assigned work. <br/><br/>As a result, the effective cluster-wide rate depends on how many nodes end up processing TTL work for the table. | `sql.ttl.default_select_rate_limit`<br/>Default: 0. Minimum: 0 (unlimited). |
153+
| `ttl_delete_rate_limit` | Maximum number of rows to be deleted per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/>Note: The rate limit is applied per node per table, with the same leaseholder preference and fallback behavior as `ttl_select_rate_limit`. <br/><br/>The actual cluster-wide rate will vary depending on which nodes execute TTL work. | `sql.ttl.default_delete_rate_limit`<br/>Default: 100. Minimum: 0 (unlimited). |
154154
| `ttl_row_stats_poll_interval` | If set, counts rows and expired rows on the table to report as Prometheus metrics while the TTL job is running. Unset by default, meaning no stats are fetched and reported. | N/A |
155155
| `ttl_pause` <a name="param-ttl-pause"></a> | If set, stops the TTL job from executing. | N/A |
156156
| `ttl_job_cron` <a name="param-ttl-job-cron"></a> | Frequency at which the TTL job runs, specified using [CRON syntax](https://cron.help). <span class="version-tag">New in v23.2:</span> Default: `'@daily'` (was `'@hourly'`). | N/A |

src/current/v24.1/row-level-ttl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ The settings that control the behavior of Row-Level TTL are provided using [stor
148148
| `ttl` <a name="param-ttl"></a> | Signifies if a TTL is active. Automatically set. | N/A |
149149
| `ttl_select_batch_size` | How many rows to [select]({% link {{ page.version.version }}/select-clause.md %}) at one time during the row expiration check. Defaults to the value of the associated cluster setting if unset. | `sql.ttl.default_select_batch_size` <br/> Default: 500. Minimum: 1. |
150150
| `ttl_delete_batch_size` <a name="param-ttl-delete-batch-size"></a> | How many rows to [delete]({% link {{ page.version.version }}/delete.md %}) at a time. Defaults to the value of the associated cluster setting if unset. | `sql.ttl.default_delete_batch_size` <br/> Default: 100. Minimum: 1. |
151-
| `ttl_select_rate_limit` | Maximum number of rows to be selected per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/> Note: The rate limit is applied per leaseholder per table. In practice, it will vary based on the number of [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-range) and [leaseholders]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-leaseholder). <br/> For example, if this variable is set to 500, and a table `public.foo` has its ranges spread across 3 leaseholders, then the cluster-wide rate limit for `public.foo` is 500 x 3 = 1500. <br/> To determine the number of leaseholders for some table `public.bar` on CockroachDB v23.1+, issue the following query against the output of [`SHOW RANGES ... WITH DETAILS`]({% link {{ page.version.version }}/show-ranges.md %}#show-ranges-for-a-table-with-details): <br/> `SELECT count(DISTINCT lease_holder) FROM [SHOW RANGES FROM TABLE public.bar WITH DETAILS];` | `sql.ttl.default_select_rate_limit` <br/> Default: 0. Minimum: 0 (unlimited). |
152-
| `ttl_delete_rate_limit` | Maximum number of rows to be deleted per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/> Note: The rate limit is applied per leaseholder per table. In practice, it will vary based on the number of [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-range) and [leaseholders]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-leaseholder). <br/> For example, if this variable is set to 500, and a table `public.foo` has its ranges spread across 3 leaseholders, then the cluster-wide rate limit for `public.foo` is 500 x 3 = 1500. <br/> To determine the number of leaseholders for some table `public.bar` on CockroachDB v23.1+, issue the following query against the output of [`SHOW RANGES ... WITH DETAILS`]({% link {{ page.version.version }}/show-ranges.md %}#show-ranges-for-a-table-with-details): <br/> `SELECT count(DISTINCT lease_holder) FROM [SHOW RANGES FROM TABLE public.bar WITH DETAILS];` | `sql.ttl.default_delete_rate_limit` <br/> Default: 100. Minimum: 0 (unlimited). |
151+
| `ttl_select_rate_limit` | Maximum number of rows to be selected per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/>Note: The rate limit is applied per node per table. The TTL job prefers to assign work to the leaseholder of each range, but this is not guaranteed. In some cases, non-leaseholder nodes may be assigned work. <br/><br/>As a result, the effective cluster-wide rate depends on how many nodes end up processing TTL work for the table. | `sql.ttl.default_select_rate_limit`<br/>Default: 0. Minimum: 0 (unlimited). |
152+
| `ttl_delete_rate_limit` | Maximum number of rows to be deleted per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/>Note: The rate limit is applied per node per table, with the same leaseholder preference and fallback behavior as `ttl_select_rate_limit`. <br/><br/>The actual cluster-wide rate will vary depending on which nodes execute TTL work. | `sql.ttl.default_delete_rate_limit`<br/>Default: 100. Minimum: 0 (unlimited). |
153153
| `ttl_row_stats_poll_interval` | If set, counts rows and expired rows on the table to report as Prometheus metrics while the TTL job is running. Unset by default, meaning no stats are fetched and reported. | N/A |
154154
| `ttl_pause` <a name="param-ttl-pause"></a> | If set, stops the TTL job from executing. | N/A |
155155
| `ttl_job_cron` <a name="param-ttl-job-cron"></a> | Frequency at which the TTL job runs, specified using [CRON syntax](https://cron.help). Default: `'@daily'` (was `'@hourly'`). | N/A |

src/current/v24.2/row-level-ttl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ The settings that control the behavior of Row-Level TTL are provided using [stor
148148
| `ttl` <a name="param-ttl"></a> | Signifies if a TTL is active. Automatically set. | N/A |
149149
| `ttl_select_batch_size` | How many rows to [select]({% link {{ page.version.version }}/select-clause.md %}) at one time during the row expiration check. Defaults to the value of the associated cluster setting if unset. | `sql.ttl.default_select_batch_size` <br/> Default: 500. Minimum: 1. |
150150
| `ttl_delete_batch_size` <a name="param-ttl-delete-batch-size"></a> | How many rows to [delete]({% link {{ page.version.version }}/delete.md %}) at a time. Defaults to the value of the associated cluster setting if unset. | `sql.ttl.default_delete_batch_size` <br/> Default: 100. Minimum: 1. |
151-
| `ttl_select_rate_limit` | Maximum number of rows to be selected per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/> Note: The rate limit is applied per leaseholder per table. In practice, it will vary based on the number of [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-range) and [leaseholders]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-leaseholder). <br/> For example, if this variable is set to 500, and a table `public.foo` has its ranges spread across 3 leaseholders, then the cluster-wide rate limit for `public.foo` is 500 x 3 = 1500. <br/> To determine the number of leaseholders for some table `public.bar` on CockroachDB v23.1+, issue the following query against the output of [`SHOW RANGES ... WITH DETAILS`]({% link {{ page.version.version }}/show-ranges.md %}#show-ranges-for-a-table-with-details): <br/> `SELECT count(DISTINCT lease_holder) FROM [SHOW RANGES FROM TABLE public.bar WITH DETAILS];` | `sql.ttl.default_select_rate_limit` <br/> Default: 0. Minimum: 0 (unlimited). |
152-
| `ttl_delete_rate_limit` | Maximum number of rows to be deleted per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/> Note: The rate limit is applied per leaseholder per table. In practice, it will vary based on the number of [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-range) and [leaseholders]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-leaseholder). <br/> For example, if this variable is set to 500, and a table `public.foo` has its ranges spread across 3 leaseholders, then the cluster-wide rate limit for `public.foo` is 500 x 3 = 1500. <br/> To determine the number of leaseholders for some table `public.bar` on CockroachDB v23.1+, issue the following query against the output of [`SHOW RANGES ... WITH DETAILS`]({% link {{ page.version.version }}/show-ranges.md %}#show-ranges-for-a-table-with-details): <br/> `SELECT count(DISTINCT lease_holder) FROM [SHOW RANGES FROM TABLE public.bar WITH DETAILS];` | `sql.ttl.default_delete_rate_limit` <br/> Default: 100. Minimum: 0 (unlimited). |
151+
| `ttl_select_rate_limit` | Maximum number of rows to be selected per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/>Note: The rate limit is applied per node per table. The TTL job prefers to assign work to the leaseholder of each range, but this is not guaranteed. In some cases, non-leaseholder nodes may be assigned work. <br/><br/>As a result, the effective cluster-wide rate depends on how many nodes end up processing TTL work for the table. | `sql.ttl.default_select_rate_limit`<br/>Default: 0. Minimum: 0 (unlimited). |
152+
| `ttl_delete_rate_limit` | Maximum number of rows to be deleted per second (rate limit). Defaults to the value of the associated cluster setting if unset. <br/><br/>Note: The rate limit is applied per node per table, with the same leaseholder preference and fallback behavior as `ttl_select_rate_limit`. <br/><br/>The actual cluster-wide rate will vary depending on which nodes execute TTL work. | `sql.ttl.default_delete_rate_limit`<br/>Default: 100. Minimum: 0 (unlimited). |
153153
| `ttl_row_stats_poll_interval` | If set, counts rows and expired rows on the table to report as Prometheus metrics while the TTL job is running. Unset by default, meaning no stats are fetched and reported. | N/A |
154154
| `ttl_pause` <a name="param-ttl-pause"></a> | If set, stops the TTL job from executing. | N/A |
155155
| `ttl_job_cron` <a name="param-ttl-job-cron"></a> | Frequency at which the TTL job runs, specified using [CRON syntax](https://cron.help). Default: `'@daily'` (was `'@hourly'`). | N/A |

0 commit comments

Comments
 (0)