Skip to content

Commit f97a4b3

Browse files
committed
feat: add pangu linter
1 parent ae6c63c commit f97a4b3

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

.github/workflows/pangu.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Check Markdown format
2+
on:
3+
pull_request:
4+
types: [ synchronize, opened, reopened ]
5+
branches:
6+
- master
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- uses: dorny/paths-filter@v3
14+
id: changes
15+
with:
16+
list-files: shell
17+
filters: |
18+
markdown:
19+
- added|modified: '**/*.md'
20+
- name: Install packages
21+
if: ${{ steps.changes.outputs.markdown == 'true' }}
22+
run: pip install -U pangu
23+
- name: Check format
24+
if: ${{ steps.changes.outputs.markdown == 'true' }}
25+
run: for markdown_file in ${{ steps.changes.outputs.markdown_files }}; do diff <(pangu -f ${markdown_file}) <(cat ${markdown_file}); done
26+

_docs/zh/administration/backup-request.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ backup request 的实现原理比较简单:对于读操作(目前写操作
1414
# 如何使用
1515
在 Pegasus Java client v2.0.0 中,我们增加了一个接口,通过该接口可以打开某个表的 backup request 功能。其实现如下:
1616
```java
17-
public PegasusTableInterface openTable(String tableName, int backupRequestDelayMs) throws PException;
17+
public PegasusTableInterface openTable (String tableName, int backupRequestDelayMs) throws PException;
1818
```
19-
20-
相比于老版本的 `openTable` 接口,我们增加了一个 `backupRequestDelayMs` 参数。这个参数便是上文所指的时延,即:向 primary 发送请求,如果过了 `backupRequestDelayMs` 毫秒 response 仍没有返回,则向 secondary 发送 backup request。需要注意的是,`backupRequestDelayMs <= 0` 代表禁用 backup request 功能。
19+
相比于老版本的`openTable`接口,我们增加了一个`backupRequestDelayMs`参数。这个参数便是上文所指的时延,即:向 primary 发送请求,如果过了`backupRequestDelayMs`毫秒 response 仍没有返回,则向 secondary 发送 backup request。需要注意的是,`backupRequestDelayMs <= 0` 代表禁用 backup reqeust 功能。
2120

2221
另外在老版本的 `openTable` 接口中,backup request 功能默认是关闭的。
2322

0 commit comments

Comments
 (0)