From 5da59043606b266ebb6d7d7930db4abad6046b91 Mon Sep 17 00:00:00 2001 From: Yuecai Liu <38887641+luky116@users.noreply.github.com> Date: Tue, 6 Sep 2022 13:53:34 +0800 Subject: [PATCH] fix global transation time out (#258) --- pkg/tm/transaction_executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tm/transaction_executor.go b/pkg/tm/transaction_executor.go index 1a57c4fd3..4acf74c88 100644 --- a/pkg/tm/transaction_executor.go +++ b/pkg/tm/transaction_executor.go @@ -65,7 +65,7 @@ func Begin(ctx context.Context, name string) context.Context { } // todo timeout should read from config - err := GetGlobalTransactionManager().Begin(ctx, tx, 60000*30, name) + err := GetGlobalTransactionManager().Begin(ctx, tx, time.Second*30, name) if err != nil { panic(fmt.Sprintf("transactionTemplate: begin transaction failed, error %v", err)) }