diff --git a/content/en/docs/17.0/reference/programs/vttablet.md b/content/en/docs/17.0/reference/programs/vttablet.md index f55b18d7b..d4106b6ae 100644 --- a/content/en/docs/17.0/reference/programs/vttablet.md +++ b/content/en/docs/17.0/reference/programs/vttablet.md @@ -401,6 +401,7 @@ The following global options apply to `vttablet`: | --twopc_coordinator_address | string | address of the (VTGate) process(es) that will be used to notify of abandoned transactions. | | --twopc_enable | boolean | if the flag is on, 2pc is enabled. Other 2pc flags must be supplied. | | --tx-throttler-config | string | Synonym to -tx_throttler_config (default "target_replication_lag_sec: 2\nmax_replication_lag_sec: 10\ninitial_rate: 100\nmax_increase: 1\nemergency_decrease: 0.5\nmin_duration_between_increases_sec: 40\nmax_duration_between_increases_sec: 62\nmin_duration_between_decreases_sec: 20\nspread_backlog_across_sec: 20\nage_bad_rate_after_sec: 180\nbad_rate_increase: 0.1\nmax_rate_approach_threshold: 0.9\n") | +| --tx-throttler-default-priority int | int | Default query priority used by the transaction throttler if it is not specified in a query comment directive. It must be a number between 0 (highest priority) and 100 (lowest priority) (default: 100) | | --tx-throttler-healthcheck-cells | strings | Synonym to -tx_throttler_healthcheck_cells | | --tx_throttler_config | string | The configuration of the transaction throttler as a text formatted throttlerdata.Configuration protocol buffer message (default "target_replication_lag_sec: 2\nmax_replication_lag_sec: 10\ninitial_rate: 100\nmax_increase: 1\nemergency_decrease: 0.5\nmin_duration_between_increases_sec: 40\nmax_duration_between_increases_sec: 62\nmin_duration_between_decreases_sec: 20\nspread_backlog_across_sec: 20\nage_bad_rate_after_sec: 180\nbad_rate_increase: 0.1\nmax_rate_approach_threshold: 0.9\n") | | --tx_throttler_healthcheck_cells | strings | A comma-separated list of cells. Only tabletservers running in these cells will be monitored for replication lag by the transaction throttler. | diff --git a/content/en/docs/17.0/user-guides/configuration-advanced/comment-directives.md b/content/en/docs/17.0/user-guides/configuration-advanced/comment-directives.md index daad76c7a..faadca599 100644 --- a/content/en/docs/17.0/user-guides/configuration-advanced/comment-directives.md +++ b/content/en/docs/17.0/user-guides/configuration-advanced/comment-directives.md @@ -119,3 +119,15 @@ As shown above, the metrics being instrumented this way are `vttablet_query_coun If the query lacks the `WORKLOAD_NAME` directive, the corresponding label in the metric will have the value of an empty string. If `vttablet` is not started with `--enable-per-workload-table-metrics`, metrics are emitted without the workload label (e.g. `vttablet_query_counts{plan="Select",table="customer"}`. + +### Priority (`PRIORITY`) + +Specifies the priority associated with the execution of this query, as a number between 0 (highest priority) and 100 +(lowest priority). The priority is used by the transaction throttler (see `--tx-throttler-...` and `-enable-tx-throttler` +flags in the `vttablet` [documentation](../../reference/programs/vttablet.md))) to determine whether a particular query +should be throttled. If the transaction throttler determines that a query may need to be throttled, it will throttle it +with a probability equal to the provided query priority. This allows avoiding high business impact queries from being +throttled (by setting their priority to `0`) while letting less business critical ones continue to be throttled (by +setting their priority to more than `0`). + +Notice that this directive has no effect if the transaction throttler is not enabled.