what does "Mvcc(WriteConflict" mean?

82 views
Skip to first unread message

travis

unread,
Nov 26, 2018, 9:59:02 PM11/26/18
to TiDB user group

i am testing using a jdbc driver. should i re-try whenever i see this exception? do i have to parse the exception message in order to make a decision on whether to re-try or not?



Caused by: java.sql.SQLException: [try again later]: tikv restarts txn: Txn(Mvcc(WriteConflict { start_ts: 404560078395670530, conflict_ts: 404560078395670532, key: [116, 128, 0, 0, 0, 0, 0, 0, 255, 73, 95, 114, 128, 0, 0, 0, 0, 255, 0, 2, 68, 0, 0, 0, 0, 0, 250], primary: [116, 128, 0, 0, 0, 0, 0, 0, 73, 95, 114, 128, 0, 0, 0, 0, 0, 0, 14] }))

at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)

at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)

Morgan Tocker (PingCAP)

unread,
Jan 28, 2019, 2:02:10 AM1/28/19
to TiDB user group
Hi travis,
TiDB will automatically retry transactions up to retry-limit times:

Certain statements will disable retry automatically (SELECT .. FOR UPDATE), and it is also possible retry can be disabled by setting tidb_disable_txn_auto_retry.

Do you mind sharing your TiDB version?

- Morgan
Reply all
Reply to author
Forward
0 new messages