Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAQ: add FAQ questions and update format #751

Merged
merged 10 commits into from
Jun 13, 2018
Merged

FAQ: add FAQ questions and update format #751

merged 10 commits into from
Jun 13, 2018

Conversation

lhyPingcap
Copy link
Contributor

@meyu44
Copy link
Contributor

meyu44 commented Jun 5, 2018

@shenli PTAL

FAQ.md Outdated
@@ -203,6 +254,35 @@ TiDB 支持部署和运行在 Intel x86-64 架构的 64 位通用硬件服务器

使用 docker-compose 在本地一键拉起一个集群,包括集群监控,还可以根据需求自定义各个组件的软件版本和实例个数,以及自定义配置文件,这种只限于开发环境,详细可参考:[官方文档](https://pingcap.com/docs-cn/op-guide/docker-compose/)。

#### 2.2.4 如何开启 TiDB 中的慢查询日志?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个有歧义,简单来说,tidb的慢查询日志一直有,只是打印在哪个文件里的问题,另外可以写一下如何在日志中找到慢查询相关信息

FAQ.md Outdated

#### 9.2.4 ERROR 9001 (HY000): PD server timeoutstart timestamp may fall behind safepoint

这个报错一般是 TiDB 访问 PD 出了问题,TiDB 后台有个 worker 会不断地从 PD 查询 safepoint,如果超过 100s 查不成功就会报这个错。TiDB 常见错误码请参考 [错误码与故障诊断](https://pingcap.com/docs-cn/sql/error/)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里加一下如何诊断以及解决

Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the punctuation, format, wording, and links as listed in the comments.

FAQ.md Outdated
@@ -84,6 +84,47 @@ TiDB 字符集默认就是 UTF8 而且目前只支持 UTF8,字符串就是 mem

一个事务中的语句数量,默认限制最大为 5000 条。

#### 1.1.19 TiDB 是否支持 XA?

虽然 TiDB 的 JDBC 驱动用的就是 MySQL JDBC(Connector / J), 但是当使用 Atomikos 的时候,数据源要配置成类似这样的配置:`type="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"`。MySQL JDBC XADataSource 连接 TiDB 的模式目前是不支持的。MySQL JDBC 中配置好的 XADataSource 模式,只对 MySQL 数据库起作用(dml 去修改 redo 等)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please pay attention to the punctuation: change the first comma to the Chinese version.
  • dml -> DML

FAQ.md Outdated

虽然 TiDB 的 JDBC 驱动用的就是 MySQL JDBC(Connector / J), 但是当使用 Atomikos 的时候,数据源要配置成类似这样的配置:`type="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"`。MySQL JDBC XADataSource 连接 TiDB 的模式目前是不支持的。MySQL JDBC 中配置好的 XADataSource 模式,只对 MySQL 数据库起作用(dml 去修改 redo 等)。

Atomikos 配好两个数据源后,JDBC 驱动都要设置成 XA 模式,然后 Atomikos 在操作 TM 和 RM(DB)的时候,会通过数据源的配置,发起带有 XA 指令到 JDBC 层,JDBC 层 XA 模式启用的情况下,会对 InnoDB(如果是 MySQL 的话)下发操作一连串 XA 逻辑的动作,包括 DML 去变更 redo log 等,就是两阶段递交的那些操作。TiDB 的引擎目前版本中,没有对上层应用层 JTA / XA 的支持,是不解析这些 Atomikos 发过来的 XA 类型的操作的。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "TiDB 的引擎目前版本中,没有对上层应用层 JTA / XA 的支持,是不解析这些 Atomikos 发过来的 XA 类型的操作的。" to:

"TiDB 目前的引擎版本中,没有对上层应用层 JTA / XA 的支持,不解析这些 Atomikos 发过来的 XA 类型的操作。"

FAQ.md Outdated

#### 1.1.20 show processlist 是否显示系统线程号?

TiDB 的 `show processlist` 与 mysql 的 `show processlist` 显示内容基本一样,不会显示系统进程号,而 ID 表示当前的 session ID。其中 TiDB 的 `show processlist` 和 mysql 的 `show processlist` 区别如下:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mysql -> MySQL

Please correct all "mysql"s in this PR to "MySQL".

FAQ.md Outdated

TiDB 的 `show processlist` 与 mysql 的 `show processlist` 显示内容基本一样,不会显示系统进程号,而 ID 表示当前的 session ID。其中 TiDB 的 `show processlist` 和 mysql 的 `show processlist` 区别如下:

1)由于 TiDB 是分布式数据库,tidb-server 实例是无状态的 SQL 解析和执行引擎(详情可参考 [TiDB 整体架构](https://pingcap.com/docs-cn/overview/#tidb-整体架构)),用户使用 mysql 客户端登录的是哪个 tidb-server,`show processlist` 就会显示当前连接的这个 tidb-server 中执行的 session 列表,不是整个集群中运行的全部 session 列表;而 mysql 是单机数据库,`show processlist` 列出的是当前整个 mysql 数据库的全部执行 SQL 列表。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Delete the extra whitespace after "全部".
  • Change all the links involved in this PR to the relative path link. For example: [TiDB 整体架构](overview.md#tidb-整体架构)

FAQ.md Outdated

#### 1.1.21 如何修改用户名密码和权限?

TiDB 作为分布式数据库,在 TiDB 中修改用户密码建议使用 `set password for 'root'@'%' = '0101001';` 或 `alter` 方法,不推荐使用 `update mysql.user` 的方法进行,这种方法可能会造成其它节点刷新不及时的情况。修改权限也一样,都建议采用官方的标准语法。详情可参考 [TiDB 用户账户管理](https://pingcap.com/docs-cn/sql/user-account-management/)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto. relative path link

FAQ.md Outdated
@@ -266,7 +346,7 @@ Binary 不是我们建议的安装方式,对升级支持也不友好,建议

#### 3.1.5 TiDB 有哪些系统表?

和 MySQL 类似,TiDB 中也有系统表,用于存放数据库运行时所需信息,具体信息参考:[TiDB 系统数据库](https://pingcap.com/docs-cn/sql/system-database/)文档。
和 MySQL 类似,TiDB 中也有系统表,用于存放数据库运行时所需信息,具体信息参考:[TiDB 系统数据库](https://pingcap.com/docs-cn/sql/system-database/) 文档。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • link
  • Delete the extra whitespace

FAQ.md Outdated
@@ -382,7 +462,7 @@ Client 连接只能通过 TiDB 访问集群,TiDB 负责连接 PD 与 TiKV,PD

#### 3.3.4 Infomation_schema 能否支持更多真实信息?

Infomation_schema 库里面的表主要是为了兼容 MySQL 而存在,有些第三方软件会查询里面的信息。在目前 TiDB 的实现中,里面大部分只是一些空表。后续随着 TiDB 的升级,会提供更多的参数信息。当前 TiDB 支持的:Infomation\_schema 请参考[TiDB 系统数据库说明文档](https://pingcap.com/docs-cn/sql/system-database)。
Infomation_schema 库里面的表主要是为了兼容 MySQL 而存在,有些第三方软件会查询里面的信息。在目前 TiDB 的实现中,里面大部分只是一些空表。后续随着 TiDB 的升级,会提供更多的参数信息。当前 TiDB 支持的:Infomation\_schema 请参考 [TiDB 系统数据库说明文档](https://pingcap.com/docs-cn/sql/system-database)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • link
  • Delete the extra whitespace after "参考"

FAQ.md Outdated
@@ -412,7 +496,7 @@ TiKV 本地存储的 cluster ID 和指定的 PD 的 cluster ID 不一致。在

#### 3.4.3 TiKV 启动报错:duplicated store address

启动参数中的地址已经被其他的 TiKV 注册在 PD 集群中了。造成该错误的常见情况:TiKV `--data-dir` 指定的路径下没有数据文件夹(删除或移动后没有更新 --data-dir),用之前参数重新启动该 TiKV。请尝试用 pd-ctl 的[store delete](https://github.com/pingcap/pd/tree/master/pdctl#store-delete-store_id)功能,删除之前的 store, 然后重新启动 TiKV 即可。
启动参数中的地址已经被其他的 TiKV 注册在 PD 集群中了。造成该错误的常见情况:TiKV `--data-dir` 指定的路径下没有数据文件夹(删除或移动后没有更新 --data-dir),用之前参数重新启动该 TiKV。请尝试用 pd-ctl 的 [store delete](https://github.com/pingcap/pd/tree/master/pdctl#store-delete-store_id) 功能,删除之前的 store, 然后重新启动 TiKV 即可。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the Chinese version for the last comma.

FAQ.md Outdated
@@ -578,6 +666,14 @@ DB2、Oracle 到 TiDB 数据迁移(增量+全量),通常做法有:

没有,目前依赖程序自行实现。

##### 4.2.1.4 利用 Syncer 做数据同步的时候是否支持只同步部分表?

支持,具体参考 syncer 使用手册 [Syncer 使用文档](https://pingcap.com/docs-cn/tools/syncer/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • syncer -> Syncer
  • link

FAQ.md Outdated
@@ -599,7 +695,7 @@ TiDB 读流量可以通过增加 TiDB server 进行扩展,总读容量无限
- KV entry 的总条数不超过 30w
- KV entry 的总大小不超过 100MB

在 Google 的 Cloud Spanner 上面,也有类似的[限制](https://cloud.google.com/spanner/docs/limits)。
在 Google 的 Cloud Spanner 上面,也有类似的 [限制](https://cloud.google.com/spanner/docs/limits)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete all the similar whitespace before linked Chinese words involved in this PR.

@lilin90 lilin90 changed the title update FAQ FAQ: add FAQ questions and update format Jun 8, 2018
FAQ.md Outdated

#### 1.1.14 TiDB 对那些 MySQL variables 兼容?

详细可参考[系统变量](sql/variable.md)
详细可参考[系统变量](sql/variable.md)

#### 1.1.15 TiDB 是否支持 select for update 吗?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> TiDB 是否支持 select for update?

Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhengwanbo
Copy link
Contributor

LGTM

@zhengwanbo zhengwanbo closed this Jun 13, 2018
@liubo0127 liubo0127 reopened this Jun 13, 2018
Copy link
Contributor

@zhengwanbo zhengwanbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhengwanbo zhengwanbo merged commit 4563f18 into pingcap:master Jun 13, 2018
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants