Skip to content

Commit dfe4353

Browse files
hfxsdqiancai
authored andcommitted
Revert "Merge remote-tracking branch 'upstream/master' into rn-9.0.0"
This reverts commit 04c337e, reversing changes made to 1a05ab8.
1 parent d19e194 commit dfe4353

File tree

102 files changed

+272
-1213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+272
-1213
lines changed

.github/workflows/doc_review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7777
API_PROVIDER: "openai" # or "openai" if you want to use OpenAI
7878
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
79-
OPENAI_API_MODEL: "gpt-4o"
79+
OPENAI_API_MODEL: "gpt-4"
8080
exclude: "**/*.json" # Optional: exclude patterns separated by commas
8181
REVIEW_MODE: ${{ steps.extract.outputs.REVIEW_MODE || 'default' }}
8282
COMMIT_SHA: ${{ steps.extract.outputs.COMMIT_SHA || '' }}

TOC.md

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -280,37 +280,6 @@
280280
- [Monitoring API](/tidb-monitoring-api.md)
281281
- [Deploy Monitoring Services](/deploy-monitoring-services.md)
282282
- [Upgrade Monitoring Services](/upgrade-monitoring-services.md)
283-
- TiDB Dashboard
284-
- [Overview](/dashboard/dashboard-intro.md)
285-
- Maintain
286-
- [Deploy](/dashboard/dashboard-ops-deploy.md)
287-
- [Reverse Proxy](/dashboard/dashboard-ops-reverse-proxy.md)
288-
- [User Management](/dashboard/dashboard-user.md)
289-
- [Secure](/dashboard/dashboard-ops-security.md)
290-
- [Access](/dashboard/dashboard-access.md)
291-
- [Overview Page](/dashboard/dashboard-overview.md)
292-
- [Cluster Info Page](/dashboard/dashboard-cluster-info.md)
293-
- [Top SQL Page](/dashboard/top-sql.md)
294-
- [Key Visualizer Page](/dashboard/dashboard-key-visualizer.md)
295-
- [Metrics Relation Graph](/dashboard/dashboard-metrics-relation.md)
296-
- SQL Statements Analysis
297-
- [SQL Statements Page](/dashboard/dashboard-statement-list.md)
298-
- [SQL Details Page](/dashboard/dashboard-statement-details.md)
299-
- [Slow Queries Page](/dashboard/dashboard-slow-query.md)
300-
- Cluster Diagnostics
301-
- [Access Cluster Diagnostics Page](/dashboard/dashboard-diagnostics-access.md)
302-
- [View Diagnostics Report](/dashboard/dashboard-diagnostics-report.md)
303-
- [Use Diagnostics](/dashboard/dashboard-diagnostics-usage.md)
304-
- [Monitoring Page](/dashboard/dashboard-monitoring.md)
305-
- [Search Logs Page](/dashboard/dashboard-log-search.md)
306-
- [Resource Manager Page](/dashboard/dashboard-resource-manager.md)
307-
- Instance Profiling
308-
- [Manual Profiling](/dashboard/dashboard-profiling.md)
309-
- [Continuous Profiling](/dashboard/continuous-profiling.md)
310-
- Session Management and Configuration
311-
- [Share Session](/dashboard/dashboard-session-share.md)
312-
- [Configure SSO](/dashboard/dashboard-session-sso.md)
313-
- [FAQ](/dashboard/dashboard-faq.md)
314283
- [Export Grafana Snapshots](/exporting-grafana-snapshots.md)
315284
- [TiDB Cluster Alert Rules](/alert-rules.md)
316285
- [TiFlash Alert Rules](/tiflash/tiflash-alert-rules.md)
@@ -808,7 +777,6 @@
808777
- [`BEGIN`](/sql-statements/sql-statement-begin.md)
809778
- [`CALIBRATE RESOURCE`](/sql-statements/sql-statement-calibrate-resource.md)
810779
- [`CANCEL IMPORT JOB`](/sql-statements/sql-statement-cancel-import-job.md)
811-
- [`CANCEL TRAFFIC JOBS`](/sql-statements/sql-statement-cancel-traffic-jobs.md)
812780
- [`COMMIT`](/sql-statements/sql-statement-commit.md)
813781
- [`CREATE BINDING`](/sql-statements/sql-statement-create-binding.md)
814782
- [`CREATE DATABASE`](/sql-statements/sql-statement-create-database.md)
@@ -915,16 +883,13 @@
915883
- [`SHOW TABLE REGIONS`](/sql-statements/sql-statement-show-table-regions.md)
916884
- [`SHOW TABLE STATUS`](/sql-statements/sql-statement-show-table-status.md)
917885
- [`SHOW TABLES`](/sql-statements/sql-statement-show-tables.md)
918-
- [`SHOW TRAFFIC JOBS`](/sql-statements/sql-statement-show-traffic-jobs.md)
919886
- [`SHOW VARIABLES`](/sql-statements/sql-statement-show-variables.md)
920887
- [`SHOW WARNINGS`](/sql-statements/sql-statement-show-warnings.md)
921888
- [`SHUTDOWN`](/sql-statements/sql-statement-shutdown.md)
922889
- [`SPLIT REGION`](/sql-statements/sql-statement-split-region.md)
923890
- [`START TRANSACTION`](/sql-statements/sql-statement-start-transaction.md)
924891
- [`TABLE`](/sql-statements/sql-statement-table.md)
925892
- [`TRACE`](/sql-statements/sql-statement-trace.md)
926-
- [`TRAFFIC CAPTURE`](/sql-statements/sql-statement-traffic-capture.md)
927-
- [`TRAFFIC REPLAY`](/sql-statements/sql-statement-traffic-replay.md)
928893
- [`TRUNCATE`](/sql-statements/sql-statement-truncate.md)
929894
- [`UNLOCK STATS`](/sql-statements/sql-statement-unlock-stats.md)
930895
- [`UPDATE`](/sql-statements/sql-statement-update.md)
@@ -1069,12 +1034,43 @@
10691034
- [Metadata Lock](/metadata-lock.md)
10701035
- [TiDB Accelerated Table Creation](/accelerated-table-creation.md)
10711036
- [Schema Cache](/schema-cache.md)
1037+
- UI
1038+
- TiDB Dashboard
1039+
- [Overview](/dashboard/dashboard-intro.md)
1040+
- Maintain
1041+
- [Deploy](/dashboard/dashboard-ops-deploy.md)
1042+
- [Reverse Proxy](/dashboard/dashboard-ops-reverse-proxy.md)
1043+
- [User Management](/dashboard/dashboard-user.md)
1044+
- [Secure](/dashboard/dashboard-ops-security.md)
1045+
- [Access](/dashboard/dashboard-access.md)
1046+
- [Overview Page](/dashboard/dashboard-overview.md)
1047+
- [Cluster Info Page](/dashboard/dashboard-cluster-info.md)
1048+
- [Top SQL Page](/dashboard/top-sql.md)
1049+
- [Key Visualizer Page](/dashboard/dashboard-key-visualizer.md)
1050+
- [Metrics Relation Graph](/dashboard/dashboard-metrics-relation.md)
1051+
- SQL Statements Analysis
1052+
- [SQL Statements Page](/dashboard/dashboard-statement-list.md)
1053+
- [SQL Details Page](/dashboard/dashboard-statement-details.md)
1054+
- [Slow Queries Page](/dashboard/dashboard-slow-query.md)
1055+
- Cluster Diagnostics
1056+
- [Access Cluster Diagnostics Page](/dashboard/dashboard-diagnostics-access.md)
1057+
- [View Diagnostics Report](/dashboard/dashboard-diagnostics-report.md)
1058+
- [Use Diagnostics](/dashboard/dashboard-diagnostics-usage.md)
1059+
- [Monitoring Page](/dashboard/dashboard-monitoring.md)
1060+
- [Search Logs Page](/dashboard/dashboard-log-search.md)
1061+
- [Resource Manager Page](/dashboard/dashboard-resource-manager.md)
1062+
- Instance Profiling
1063+
- [Manual Profiling](/dashboard/dashboard-profiling.md)
1064+
- [Continuous Profiling](/dashboard/continuous-profiling.md)
1065+
- Session Management and Configuration
1066+
- [Share Session](/dashboard/dashboard-session-share.md)
1067+
- [Configure SSO](/dashboard/dashboard-session-sso.md)
1068+
- [FAQ](/dashboard/dashboard-faq.md)
10721069
- [Telemetry](/telemetry.md)
10731070
- [Error Codes](/error-codes.md)
10741071
- [Table Filter](/table-filter.md)
10751072
- [Schedule Replicas by Topology Labels](/schedule-replicas-by-topology-labels.md)
10761073
- [URI Formats of External Storage Services](/external-storage-uri.md)
1077-
- [TiDB Workload Repository](/workload-repository.md)
10781074
- FAQs
10791075
- [FAQ Summary](/faq/faq-overview.md)
10801076
- [TiDB FAQs](/faq/tidb-faq.md)

_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ summary: TiDB is an open-source distributed SQL database that supports Hybrid Tr
8282

8383
<LearningPath label="Monitor" icon="cloud6">
8484

85-
[Use Prometheus, Grafana, and TiDB Dashboard](https://docs.pingcap.com/tidb/dev/tidb-monitoring-framework)
85+
[Use Prometheus and Grafana](https://docs.pingcap.com/tidb/dev/tidb-monitoring-framework)
8686

8787
[Monitoring API](https://docs.pingcap.com/tidb/dev/tidb-monitoring-api)
8888

basic-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u
2828
| [Date and time types](/data-type-date-and-time.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
2929
| [String types](/data-type-string.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
3030
| [JSON type](/data-type-json.md) | Y | Y | Y | Y | Y | E | E | E | E | E |
31-
| [Vector types](/vector-search/vector-search-data-types.md) | E | N | N | N | N | N | N | N | N | N |
31+
| [Vectort types](/vector-search/vector-search-data-types.md) | E | N | N | N | N | N | N | N | N | N |
3232
| [Control flow functions](/functions-and-operators/control-flow-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
3333
| [String functions](/functions-and-operators/string-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
3434
| [Numeric functions and operators](/functions-and-operators/numeric-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |

benchmark/benchmark-tidb-using-tpcc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Before testing, TPC-C Benchmark specifies the initial state of the database, whi
2424
* The `DISTRICT` table has W \* 10 records (Each warehouse provides services to 10 districts)
2525
* The `CUSTOMER` table has W \* 10 \* 3,000 records (Each district has 3,000 customers)
2626
* The `HISTORY` table has W \* 10 \* 3,000 records (Each customer has one transaction history)
27-
* The `ORDER` table has W \* 10 \* 3,000 records (Each district has 3,000 orders and the last 900 orders generated are added to the `NEW-ORDER` table. Each order randomly generates 5 ~ 15 ORDER-LINE records.)
27+
* The `ORDER` table has W \* 10 \* 3,000 records (Each district has 3,000 orders and the last 900 orders generated are added to the `NEW-ORDER` table. Each order randomly generates 5 ~ 15 ORDER-LINE records.
2828

2929
In this document, the testing uses 1,000 warehouses as an example to test TiDB.
3030

best-practices/java-app-best-practices.md

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -204,62 +204,26 @@ Through monitoring, you might notice that although the application only performs
204204

205205
After it is configured, you can check the monitoring to see a decreased number of `SELECT` statements.
206206

207-
> **Note:**
208-
>
209-
> Enabling `useConfigs=maxPerformance` requires MySQL Connector/J version 8.0.33 or later. For more details, see [MySQL JDBC Bug](/develop/dev-guide-third-party-tools-compatibility.md#mysql-jdbc-bugs).
210-
211207
#### Timeout-related parameters
212208

213209
TiDB provides two MySQL-compatible parameters that controls the timeout: `wait_timeout` and `max_execution_time`. These two parameters respectively control the connection idle timeout with the Java application and the timeout of the SQL execution in the connection; that is to say, these parameters control the longest idle time and the longest busy time for the connection between TiDB and the Java application. The default value of both parameters is `0`, which by default allows the connection to be infinitely idle and infinitely busy (an infinite duration for one SQL statement to execute).
214210

215211
However, in an actual production environment, idle connections and SQL statements with excessively long execution time negatively affect databases and applications. To avoid idle connections and SQL statements that are executed for too long, you can configure these two parameters in your application's connection string. For example, set `sessionVariables=wait_timeout=3600` (1 hour) and `sessionVariables=max_execution_time=300000` (5 minutes).
216212

217-
#### Typical JDBC connection string parameters
218-
219-
Combining the preceding parameter values, the JDBC connection string configuration is as follows:
220-
221-
```
222-
jdbc:mysql://<IP_ADDRESS>:<PORT_NUMBER>/<DATABASE_NAME>?characterEncoding=UTF-8&useSSL=false&useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSqlLimit=10000&prepStmtCacheSize=1000&useConfigs=maxPerformance&rewriteBatchedStatements=true
223-
```
224-
225-
> **Note:**
226-
>
227-
> If you are connecting over a public network, you need to set `useSSL=true` and [enable TLS between TiDB clients and servers](/enable-tls-between-clients-and-servers.md).
228-
229213
## Connection pool
230214

231215
Building TiDB (MySQL) connections is relatively expensive (for OLTP scenarios at least), because in addition to building a TCP connection, connection authentication is also required. Therefore, the client usually saves the TiDB (MySQL) connections to the connection pool for reuse.
232216

233-
TiDB supports the following Java connection pools:
234-
235-
- [HikariCP](https://github.com/brettwooldridge/HikariCP)
236-
- [tomcat-jdbc](https://tomcat.apache.org/tomcat-10.1-doc/jdbc-pool)
237-
- [druid](https://github.com/alibaba/druid)
238-
- [c3p0](https://www.mchange.com/projects/c3p0/)
239-
- [dbcp](https://commons.apache.org/proper/commons-dbcp/)
217+
Java has many connection pool implementations such as [HikariCP](https://github.com/brettwooldridge/HikariCP), [tomcat-jdbc](https://tomcat.apache.org/tomcat-10.1-doc/jdbc-pool.html), [druid](https://github.com/alibaba/druid), [c3p0](https://www.mchange.com/projects/c3p0/), and [dbcp](https://commons.apache.org/proper/commons-dbcp/). TiDB does not limit which connection pool you use, so you can choose whichever you like for your application.
240218

241-
In practice, some connection pools might persistently use specific active sessions. Although the total number of connections appears evenly distributed across TiDB compute nodes, uneven distribution of active connections can lead to actual load imbalance. In distributed scenarios, it is recommended to use HikariCP, which manages connection lifecycles effectively and helps prevent active connections from being fixed on certain nodes, achieving balanced load distribution.
219+
### Configure the number of connections
242220

243-
### Typical connection pool configuration
244-
245-
The following is an example configuration for HikariCP:
246-
247-
```yaml
248-
hikari:
249-
maximumPoolSize: 20
250-
poolName: hikariCP
251-
connectionTimeout: 30000
252-
maxLifetime: 1200000
253-
keepaliveTime: 120000
254-
```
221+
It is a common practice that the connection pool size is well adjusted according to the application's own needs. Take HikariCP as an example:
255222

256-
The parameter explanations are as follows. For more details, refer to the [official HikariCP documentation](https://github.com/brettwooldridge/HikariCP/blob/dev/README.md).
223+
- `maximumPoolSize`: The maximum number of connections in the connection pool. If this value is too large, TiDB consumes resources to maintain useless connections. If this value is too small, the application gets slow connections. So configure this value for your own good. For details, see [About Pool Sizing](https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing).
224+
- `minimumIdle`: The minimum number of idle connections in the connection pool. It is mainly used to reserve some connections to respond to sudden requests when the application is idle. You can also configure it according to your application needs.
257225

258-
- `maximumPoolSize`: the maximum number of connections in the pool. The default value is `10`. In containerized environments, it is recommended to set this to 4–10 times the number of CPU cores available to the Java application. Setting this value too high can lead to resource wastage, while setting it too low can slow down connection acquisition. See [About Pool Sizing](https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing) for more details.
259-
- `minimumIdle`: HikariCP recommends not setting this parameter. The default value is equal to the value of `maximumPoolSize`, which disables connection pool scaling. This ensures that connections are readily available during traffic spikes and avoids delays caused by connection creation.
260-
- `connectionTimeout`: the maximum time (in milliseconds) that an application waits to acquire a connection from the pool. The default value is `30000` milliseconds (30 seconds). If no available connection is obtained within this time, a `SQLException` exception occurs.
261-
- `maxLifetime`: the maximum lifetime (in milliseconds) of a connection in the pool. The default value is `1800000` milliseconds (30 minutes). Connections in use are not affected. After the connection is closed, it will be removed according to this setting. Setting this value too low can cause frequent reconnections. If you are using [`graceful-wait-before-shutdown`](/tidb-configuration-file.md#graceful-wait-before-shutdown-new-in-v50), ensure this value is less than the wait time.
262-
- `keepaliveTime`: the interval (in milliseconds) between keepalive operations on connections in the pool. This setting helps prevent disconnections caused by database or network idle timeouts. The default value is `120000` milliseconds (2 minutes). The pool prefers using the JDBC4 `isValid()` method to keep idle connections alive.
226+
The application needs to return the connection after finishing using it. It is also recommended that the application use the corresponding connection pool monitoring (such as `metricRegistry`) to locate the connection pool issue in time.
263227

264228
### Probe configuration
265229

best-practices/three-nodes-hybrid-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ In this test, the value of this parameter is set to `2`. Observe the **gRPC poll
6969

7070
#### `storage.scheduler-worker-pool-size`
7171

72-
When TiKV detects that the CPU core number of the machine is greater than or equal to `16`, this parameter value defaults to `8`. When the CPU core number is smaller than `16`, the parameter value defaults to `4`. This parameter is used when TiKV converts complex transaction requests to simple key-value reads or writes, but the scheduler thread pool does not perform any writes.
72+
When TiKV detects that the CPU core number of the machine is greater than or equal to `16`, this parameter value defaults to `8`. When the CPU core number is smaller than `16`, the parameter value defaults to `4`. This parameter is used when TiKV converts complex transaction requests to simple key-value reads or writes, but the scheduler thread pool does not performs any writes.
7373

7474
Ideally, the usage rate of the scheduler thread pool is kept between 50% and 75%. Similar to the gRPC thread pool, the `storage.scheduler-worker-pool-size` parameter defaults to a larger value during the hybrid deployment, which makes resource usage insufficient. In this test, the value of this parameter is set to `2`, which is in line with the best practices, a conclusion drawn by observing the corresponding metrics in the **Scheduler worker CPU** panel.
7575

br/backup-and-restore-storages.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ TiDB supports storing backup data to Amazon S3, Google Cloud Storage (GCS), Azur
1010

1111
## Send credentials to TiKV
1212

13-
| CLI parameter | Description | Default value |
14-
|:-----------------------------|:-------------------------------------------------------------|:--------------|
15-
| `--send-credentials-to-tikv` | Controls whether to send credentials obtained by BR to TiKV. | `true` |
13+
| CLI parameter | Description | Default value
14+
|:----------|:-------|:-------|
15+
| `--send-credentials-to-tikv` | Controls whether to send credentials obtained by BR to TiKV. | `true`|
1616

1717
By default, BR sends a credential to each TiKV node when using Amazon S3, GCS, or Azure Blob Storage as the storage system. This behavior simplifies the configuration and is controlled by the parameter `--send-credentials-to-tikv`(or `-c` in short).
1818

0 commit comments

Comments
 (0)