Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@ version: 2
jobs:
lint:
docker:
- image: circleci/ruby:2.4.1-node
- image: circleci/node:lts
working_directory: ~/pingcap/docs
steps:
- checkout

- run:
name: Setup
command: |
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> $BASH_ENV
echo 'export NODE_PATH=~/.npm-global/lib/node_modules:$NODE_PATH' >> $BASH_ENV

- run:
name: "Install markdownlint"
command: |
sudo npm install -g markdownlint-cli@0.17.0
npm install -g markdownlint-cli@0.17.0

- run:
name: "Lint README"
Expand All @@ -29,6 +37,11 @@ jobs:
command: |
scripts/verify-links.sh

- run:
name: "Check link anchors"
command: |
scripts/verify-link-anchors.sh

build:
docker:
- image: andelf/doc-build:0.1.9
Expand Down
2 changes: 1 addition & 1 deletion faq/tidb-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Similar to MySQL, TiDB includes static and solid parameters. You can directly mo

#### Where and what are the data directories in TiDB (TiKV)?

TiKV data is located in the [`--data-dir`](/tikv-configuration-file.md#data-dir), which include four directories of backup, db, raft, and snap, used to store backup, data, Raft data, and mirror data respectively.
TiKV data is located in the [`--data-dir`](/tikv-configuration-file.md#--data-dir), which include four directories of backup, db, raft, and snap, used to store backup, data, Raft data, and mirror data respectively.

#### What are the system tables in TiDB?

Expand Down
2 changes: 1 addition & 1 deletion glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ aliases: ['/docs/v2.1/glossary/']

ACID refers to the four key properties of a transaction: atomicity, consistency, isolation, and durability. Each of these properties is described below.

- **Atomicity** means that either all the changes of an operation are performed, or none of them are. TiDB ensures the atomicity of the [Region](#region) that stores the Primary Key to achieve the atomicity of transactions.
- **Atomicity** means that either all the changes of an operation are performed, or none of them are. TiDB ensures the atomicity of the [Region](#regionpeerraft-group) that stores the Primary Key to achieve the atomicity of transactions.

- **Consistency** means that transactions always bring the database from one consistent state to another. In TiDB, data consistency is ensured before writing data to the memory.

Expand Down
2 changes: 1 addition & 1 deletion optimistic-transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ However, TiDB transactions also have the following disadvantages:
* In need of a centralized version manager
* OOM (out of memory) when extensive data is written in the memory

To avoid potential problems in application, refer to [transaction sizes](/transaction-overview.md#transaction-size) to see more details.
To avoid potential problems in application, refer to [transaction sizes](/transaction-overview.md#transaction-sizes) to see more details.

## Transaction retries

Expand Down
14 changes: 14 additions & 0 deletions scripts/verify-link-anchors.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
#
# In addition to verify-links.sh, this script additionally check anchors.
#
# See https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally if you meet permission problems when executing npm install.

ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd)
cd $ROOT

npm install -g remark-cli remark-lint breeswish/remark-lint-pingcap-docs-anchor

echo "info: checking links anchors under $ROOT directory..."

remark --ignore-path .gitignore -u lint -u remark-lint-pingcap-docs-anchor . --frail --quiet
7 changes: 3 additions & 4 deletions scripts/verify-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
# - When a file was moved, all other references are required to be updated for now, even if alias are given
# - This is recommended because of less redirects and better anchors support.
#
# See https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally if you meet permission problems when executing npm install.

ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd)
cd $ROOT

if ! which markdown-link-check &>/dev/null; then
sudo npm install -g markdown-link-check@3.7.3
fi
npm install -g markdown-link-check@3.8.1

VERBOSE=${VERBOSE:-}
CONFIG_TMP=$(mktemp)
Expand Down Expand Up @@ -50,7 +49,7 @@ fi
while read -r tasks; do
for task in $tasks; do
(
output=$(markdown-link-check --color --config "$CONFIG_TMP" "$task" -q)
output=$(markdown-link-check --config "$CONFIG_TMP" "$task" -q)
if [ $? -ne 0 ]; then
printf "$output" >> $ERROR_REPORT
fi
Expand Down
2 changes: 1 addition & 1 deletion tidb-binlog/handle-tidb-binlog-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Solution: Clean up the disk space and then restart Pump.

Cause: When Pump is started, it notifies all Drainer nodes that are in the `online` state. If it fails to notify Drainer, this error log is printed.

Solution: Use the [binlogctl tool](/tidb-binlog/maintain-tidb-binlog-cluster.md#binlog-guide) to check whether each Drainer node is normal or not. This is to ensure that all Drainer nodes that are in the `online` state are working normally. If the state of a Drainer node is not consistent with its actual working status, use the binlogctl tool to change its state and then restart Pump.
Solution: Use the [binlogctl tool](/tidb-binlog/maintain-tidb-binlog-cluster.md#binlogctl-guide) to check whether each Drainer node is normal or not. This is to ensure that all Drainer nodes that are in the `online` state are working normally. If the state of a Drainer node is not consistent with its actual working status, use the binlogctl tool to change its state and then restart Pump.
2 changes: 1 addition & 1 deletion tidb-lightning/deploy-tidb-lightning.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ If the data source consists of CSV files, see [CSV support](/tidb-lightning/migr

This section describes two deployment methods of TiDB Lightning:

- [Deploy TiDB Lightning using TiDB Ansible](#deploy-tidb-lightning-using-ansible)
- [Deploy TiDB Lightning using TiDB Ansible](#deploy-tidb-lightning-using-tidb-ansible)
- [Deploy TiDB Lightning manually](#deploy-tidb-lightning-manually)

### Deploy TiDB Lightning using TiDB Ansible
Expand Down
2 changes: 1 addition & 1 deletion tune-operating-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ cpufreq is a module that dynamically adjusts the CPU frequency. It supports five

### NUMA CPU binding

To avoid accessing memory across Non-Uniform Memory Access (NUMA) nodes as much as possible, you can bind a thread/process to certain CPU cores by setting the CPU affinity of the thread. For ordinary programs, you can use the `numactl` command for the CPU binding. For detailed usage, see the Linux manual pages. For network interface card (NIC) interrupts, see [tune network](#tune-network).
To avoid accessing memory across Non-Uniform Memory Access (NUMA) nodes as much as possible, you can bind a thread/process to certain CPU cores by setting the CPU affinity of the thread. For ordinary programs, you can use the `numactl` command for the CPU binding. For detailed usage, see the Linux manual pages. For network interface card (NIC) interrupts, see [tune network](#network-tuning).

### Memory—transparent huge page (THP)

Expand Down