TiDB 2.1.7Percolator model. Despite promising snap- shot isolation, TiDB 2.1.7 through 3.0.0-beta.1-40 allowed read skew and lost updates by default, thanks to two auto-retry mechanisms which blindly re-applied updates TiDB also supports a select ... for update statement which mostly, but not entirely, prevents write skew. We found a minor race condition in table creation, reduced durability & fault tolerance in fresh dependence on CLOCK_MONOTONIC_RAW for safety, but we have not yet observed anomalies due to clock skew, possibly due to tooling limitations. PingCAP has published a companion blog post to this report.0 码力 | 9 页 | 141.29 KB | 6 月前3
TiDB v6.5 DocumentationSI cannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 502 Figure 58: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 5282 页 | 99.69 MB | 1 年前3
TiDB v6.1 Documentationcannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. 419 A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 427 Figure 18: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 4487 页 | 84.44 MB | 1 年前3
TiDB v7.1 DocumentationSI cannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 516 Figure 61: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 5716 页 | 104.74 MB | 1 年前3
TiDB v7.6 DocumentationSI cannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 509 Figure 61: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 6123 页 | 107.24 MB | 1 年前3
TiDB v7.5 DocumentationSI cannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 496 Figure 61: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 6020 页 | 106.82 MB | 1 年前3
TiDB v8.1 DocumentationSI cannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 495 Figure 61: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 6321 页 | 107.46 MB | 1 年前3
TiDB v8.5 DocumentationSI cannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 592 Figure 62: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 6730 页 | 111.36 MB | 10 月前3
TiDB v8.2 Documentationcannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. 495 A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 503 Figure 61: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 6549 页 | 108.77 MB | 10 月前3
TiDB v8.3 Documentationcannot avoid write skew TiDB’s SI isolation level cannot avoid write skew exceptions. You can use the SELECT �→ FOR UPDATE syntax to avoid write skew exceptions. 498 A write skew exception occurs when same time. Let’s simulate this process with the following program: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.sql.PreparedStatement; happens. 506 Figure 61: Write Skew Now let’s change the sample program to use SELECT FOR UPDATE to avoid the write skew problem: package com.pingcap.txn.write.skew; import com.zaxxer.hikari.HikariDataSource;0 码力 | 6606 页 | 109.48 MB | 10 月前3
共 31 条
- 1
- 2
- 3
- 4













