client-go icon indicating copy to clipboard operation
client-go copied to clipboard

why txn Begin() interface does not support context param which be used to set timeout

Open luohaixiannz opened this issue 4 years ago • 3 comments

problems when my program call the Begin function, it would stalls if tikv services not working, how can I set the timeout.

file: client-go/[email protected]/tikv/txn.go // Begin a global transaction. func (s *KVStore) Begin() (*KVTxn, error) { return s.BeginWithOption(DefaultStartTSOption()) }

Anyone know how to solve the problem.

luohaixiannz avatar Aug 30 '21 11:08 luohaixiannz

Hi @luohaixiannz we are working on it. Please wait for v2.0.0 GA version :)

disksing avatar Aug 30 '21 14:08 disksing

ok, thank you

luohaixiannz avatar Aug 30 '21 15:08 luohaixiannz

How is this feature going on? We need this timeout configuration when use Begin().

vrhappy avatar May 18 '22 12:05 vrhappy