-
有三台 tidb-server
其他的也是一样
-
explain analyze 结果
-
tidb日志如下
[tidb@gzly1733 log]$ tail -f tidb_stderr.log
^C
[tidb@gzly1733 log]$ tail -f tidb.log
[2020/09/23 17:06:51.431 +08:00] [INFO] [client_batch.go:640] ["recycle idle connection"] [target=10.56.112.69:20161]
[2020/09/23 17:06:51.431 +08:00] [INFO] [client_batch.go:640] ["recycle idle connection"] [target=10.56.112.67:20160]
[2020/09/23 17:11:01.957 +08:00] [INFO] [server.go:391] ["connection closed"] [conn=5466]
[2020/09/23 17:11:39.490 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419653832114438149] [forUpdateTS=419653832114438149] [err="[kv:9007]Write conflict, txnStartTS=419653832114438149, conflictStartTS=419653832114438147, conflictCommitTS=419653832127545355, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
[2020/09/23 17:13:39.490 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419653863571718149] [forUpdateTS=419653863571718149] [err="[kv:9007]Write conflict, txnStartTS=419653863571718149, conflictStartTS=419653863571718147, conflictCommitTS=419653863584825355, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
[2020/09/23 17:14:39.489 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419653879300358149] [forUpdateTS=419653879300358149] [err="[kv:9007]Write conflict, txnStartTS=419653879300358149, conflictStartTS=419653879300358147, conflictCommitTS=419653879313465355, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
[2020/09/23 17:16:51.431 +08:00] [INFO] [client_batch.go:640] ["recycle idle connection"] [target=10.56.112.67:20160]
[2020/09/23 17:16:51.431 +08:00] [INFO] [client_batch.go:640] ["recycle idle connection"] [target=10.56.112.69:20161]
[2020/09/23 17:17:39.488 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419653926486278150] [forUpdateTS=419653926486278150] [err="[kv:9007]Write conflict, txnStartTS=419653926486278150, conflictStartTS=419653926486278148, conflictCommitTS=419653926499385355, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
[2020/09/23 17:18:39.492 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419653942214918150] [forUpdateTS=419653942214918150] [err="[kv:9007]Write conflict, txnStartTS=419653942214918150, conflictStartTS=419653942214918147, conflictCommitTS=419653942228025356, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
执行 查询 sql 后的日志
MySQL [(none)]> select * from edoc2v5.org_group where group_code = 'InbizAdmin';
Empty set (0.00 sec)
MySQL [(none)]> Bye
[root@gzly1733 edoc2v5]# tail -f /data01/tidb-deploy/tidb-4000/log/tidb.log
[2020/09/23 17:14:39.489 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419653879300358149] [forUpdateTS=419653879300358149] [err="[kv:9007]Write conflict, txnStartTS=419653879300358149, conflictStartTS=419653879300358147, conflictCommitTS=419653879313465355, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
[2020/09/23 17:16:51.431 +08:00] [INFO] [client_batch.go:640] ["recycle idle connection"] [target=10.56.112.67:20160]
[2020/09/23 17:16:51.431 +08:00] [INFO] [client_batch.go:640] ["recycle idle connection"] [target=10.56.112.69:20161]
[2020/09/23 17:17:39.488 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419653926486278150] [forUpdateTS=419653926486278150] [err="[kv:9007]Write conflict, txnStartTS=419653926486278150, conflictStartTS=419653926486278148, conflictCommitTS=419653926499385355, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
[2020/09/23 17:18:39.492 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419653942214918150] [forUpdateTS=419653942214918150] [err="[kv:9007]Write conflict, txnStartTS=419653942214918150, conflictStartTS=419653942214918147, conflictCommitTS=419653942228025356, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
[2020/09/23 17:21:23.460 +08:00] [INFO] [server.go:388] ["new connection"] [conn=5467] [remoteAddr=127.0.0.1:28202]
[2020/09/23 17:22:03.464 +08:00] [INFO] [server.go:391] ["connection closed"] [conn=5467]
[2020/09/23 17:22:39.488 +08:00] [INFO] [adapter.go:596] ["pessimistic write conflict, retry statement"] [txn=419654005129478150] [forUpdateTS=419654005129478150] [err="[kv:9007]Write conflict, txnStartTS=419654005129478150, conflictStartTS=419654005129478147, conflictCommitTS=419654005142585355, key={tableID=21, indexID=2, indexValues={17, }} primary={tableID=21, indexID=2, indexValues={17, }} [try again later]"]
[2020/09/23 17:23:19.027 +08:00] [INFO] [server.go:388] ["new connection"] [conn=5468] [remoteAddr=127.0.0.1:28576]
[2020/09/23 17:23:21.588 +08:00] [INFO] [server.go:391] ["connection closed"] [conn=5468]