• Reference Article 1
  • Reference Article 2

Summary of interface idempotent solutions

  • Database unique primary keys (unique indexes) use distributed ids as primary keys to ensure global uniqueness of ids
  • Pessimistic lock database row lock InnoDB engine
  • Optimistic lock version Version number
  • The state machine determines that the number of rows affected by the order status and updateSql statement is 0
  • The downstream generates a distributed ID to initiate a request, and the server determines repeated requests in combination with setNx
  • Duplicate Token Token