Will there be any hang situations when executing the API with the tikv-rawkv client?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tikv-rawkv客户端执行api时会不会有hang的情况发生

| username: chenbin200818

【 TiDB Usage Environment】Production Environment
【 TiDB Version】v6.5
【Consultation Questions】

  1. I am using the rawkv client. When calling the API, if there is an issue with the TiKV backend, will it cause the API call to hang?
  2. Is there a timeout mechanism to handle this? If so, how should I call it?
  3. If there is a timeout and the API returns an error, is it possible that the TiKV backend has already persisted the request (set operation)?
| username: chenbin200818 | Original post link

I am using the Go SDK.

| username: xfworld | Original post link

The pure rawkv API does not have transaction capabilities. If you want to maintain consistency, you need to consider using transaction capabilities to support it.

There are also some documents you can refer to in the official documentation:

See the image:

Additionally, there are a bunch of examples here that you can directly copy:

| username: chenbin200818 | Original post link

What I mainly want to understand is the timeout mechanism of the rawkv API.

| username: xfworld | Original post link

Reading the source code?

| username: Smityz | Original post link

Can’t it be controlled directly using context?