{"record":{"id":"21d7c7daf1c5140e","repo":"apache/shardingsphere","slug":"get-result-timeout","errorCode":null,"errorMessage":"Get result timeout","messagePattern":"Get result timeout","errorType":"exception","errorClass":"GetResultTimeoutException","httpStatus":null,"severity":"error","filePath":"kernel/data-pipeline/scenario/cdc/client/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/client/util/ResponseFuture.java","lineNumber":71,"sourceCode":"    \n    private String errorMessage;\n    \n    private Object result;\n    \n    /**\n     * Wait response result.\n     *\n     * @param timeoutMillis timeout milliseconds\n     * @param connectionContext connection context\n     * @return response result\n     * @throws GetResultTimeoutException get result timeout\n     * @throws ServerResultException server result exception\n     */\n    @SneakyThrows(InterruptedException.class)\n    public Object waitResponseResult(final long timeoutMillis, final ClientConnectionContext connectionContext) {\n        if (!countDownLatch.await(timeoutMillis, TimeUnit.MILLISECONDS)) {\n            connectionContext.getResponseFutureMap().remove(requestId);\n            throw new GetResultTimeoutException(\"Get result timeout\");\n        }\n        connectionContext.getResponseFutureMap().remove(requestId);\n        if (!Strings.isNullOrEmpty(errorMessage)) {\n            throw new ServerResultException(String.format(\"Get %s response failed, code:%s, reason: %s\", requestType.name(), errorCode, errorMessage));\n        }\n        return result;\n    }\n    \n    /**\n     * Count down.\n     */\n    public void countDown() {\n        countDownLatch.countDown();\n    }\n}\n","sourceCodeStart":53,"sourceCodeEnd":87,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/kernel/data-pipeline/scenario/cdc/client/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/client/util/ResponseFuture.java#L53-L87","documentation":"ResponseFuture.waitResponseResult blocks on a CountDownLatch for at most timeoutMillis. If the server response does not arrive in time, the future is removed from the connection context map and GetResultTimeoutException is thrown, so the caller knows the request is still outstanding and will never be completed by a late response.","triggerScenarios":"Any blocking CDC client call (start/stop subscription, DDL fetch, etc.) whose response does not arrive within the configured timeout: network partition between client and proxy, proxy busy or restarted, request dropped, or the response arriving after the latch window expired.","commonSituations":"Aggressive client timeout settings; proxy GC pauses or heavy load during large initial data transfers; firewalls dropping idle connections; proxy restarted while the client was waiting.","solutions":["Increase the client response timeout configuration passed to waitResponseResult.","Check proxy health, GC logs, and CDC job status; a wedged job on the server side delays responses.","Verify network connectivity and idle-timeout settings (firewall/LB) between the CDC client and proxy port.","Retry the request once connectivity is restored; the failed future is already removed from the map so a retry creates a fresh requestId."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    result = future.waitResponseResult(timeoutMillis, ctx);\n} catch (final GetResultTimeoutException ex) {\n    // future already removed from context map; safe to retry with a new request\n    result = retryOnce(requestBuilder.build());\n}","preventionTips":["Size the client timeout for worst-case server latency (large initial transfers).","Monitor proxy health/GC before running large CDC operations.","Keep client-server connections alive through firewalls (TCP keepalive)."],"tags":["cdc","client","timeout","network"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}