actiontech/txle

[time]time is not synchronized,cause timeout doesn't work

Closed this issue · 2 comments

Describe The Bug

When the machine running the program and the machine where the database is located are not synchronized, cause timeout doesn't work.

TXLE Version

https://github.com/actiontech/txle/commit/6bd946510f1515943e46c135d37eb1f183f30673

To Reproduce

Steps to reproduce the behavior:

  1. Set the database running server time is 1 minute slower than the alpha server time of the program running
  2. Set the timeout to 1 in @SagaStart and pause 2 seconds in the global transaction

Expected Result

the global transaction is timeout and compensation

Real Result

the global transaction is passed
image

Fixed. Use uniform server time on two sides.

See the commit log,

VERSION:

acf918e

Verification:

  1. Adjust MySQL server time to make it smaller than alpha-server
    image
  2. trigger a transaction with timeout of 1 second and running time of 2 second
    image
  3. The transaction is timed out
    image