Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 使用tikv client java 向pd发送请求,收到tikv发来的error事件后,重新获取表订阅的region时报错。

[TiDB Usage Environment] Production Environment
[TiDB Version] 4.0.16
[Reproduction Path] The tikv client in Java receives CDC events pushed by tikv. When an error event is pushed, the task should normally re-fetch the region of the subscribed table and re-establish the gRPC connection. However, it fails to fetch the subscribed table continuously, leading to an error.
[Encountered Problem: Phenomenon and Impact]
2023-10-24 09:57:44.892 [tidb-extractor-6-thd-0] WARN org.tikv.common.region.AbstractRegionStoreClient - leader for region[12] is not found, it is possible that network partition occurred
2023-10-24 09:57:44.892 [tidb-extractor-6-thd-0] INFO org.tikv.common.region.AbstractRegionStoreClient - try grpc forward: region[12]
2023-10-24 09:57:45.197 [tidb-extractor-6-thd-0] WARN org.tikv.common.region.AbstractRegionStoreClient - No store available, retry: region[12]
2023-10-24 09:57:45.197 [tidb-extractor-6-thd-0] WARN org.tikv.common.operation.RegionErrorHandler - request failed because of: DEADLINE_EXCEEDED: deadline exceeded after 19.999203340s. [closed=, open=[[remote_addr=/172.21.77.94:20160]]]
Explanation: The network is connected. It shows that the gRPC is disconnected, but I am only fetching the tableID from the catalog and then using the tableID to get the region of the table. It gets blocked continuously while fetching the catalog.