{"record":{"id":"e130dde06b303039","repo":"apache/seatunnel","slug":"error-clearing-scrollid","errorCode":null,"errorMessage":"Error clearing scrollId ","messagePattern":"Error clearing scrollId ","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java","lineNumber":321,"sourceCode":"        Map<String, String> param = new HashMap<>();\n        param.put(\"scroll_id\", scrollId);\n        request.setJsonEntity(JsonUtils.toJsonString(param));\n\n        try {\n            Response response = restClient.performRequest(request);\n            if (response == null) {\n                log.warn(\"DELETE {} response null when clearing scrollId {}\", endpoint, scrollId);\n                return false;\n            }\n            int statusCode = response.getStatusLine().getStatusCode();\n            if (statusCode == HttpStatus.SC_OK) {\n                return true;\n            } else {\n                log.warn(\"Failed to clear scrollId {}, status code={}\", scrollId, statusCode);\n                return false;\n            }\n        } catch (IOException e) {\n            log.warn(\"Error clearing scrollId \" + scrollId, e);\n            return false;\n        }\n    }\n\n    /**\n     * first time to request search documents by scroll call /${index}/_search?scroll=${scroll}\n     *\n     * @param index index name\n     * @param source select fields\n     * @param scrollTime such as:1m\n     * @param scrollSize fetch documents count in one request\n     */\n    public ScrollResult searchByScroll(\n            String index,\n            List<String> source,\n            Map<String, Object> query,\n            String scrollTime,\n            int scrollSize) {","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java#L303-L339","documentation":"A WARN logged by EasysearchClient.clearScroll when the scroll-clear DELETE request throws an IOException. The scroll context is not released and will remain until its TTL expires; the method returns false.","triggerScenarios":"Calling clearScroll while the network connection fails: connection reset, node unreachable, DNS failure, or socket timeout during the DELETE request.","commonSituations":"Easysearch node restart/crash mid-read; network partition between SeaTunnel worker and cluster; short read timeouts configured for large cluster load.","solutions":["Retry clearScroll with backoff — the exception is often transient.","Verify connectivity to the configured hosts/ports (`curl` the cluster health endpoint).","Check RestClient timeout settings and increase socket/connect timeouts if the cluster is slow.","Rely on scroll TTL expiry as a safety net if the context cannot be cleared."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    client.clearScroll(scrollId);\n} catch (IOException e) {\n    // retry once, then rely on scroll TTL expiry\n}","preventionTips":["Increase RestClient socket/connect timeouts","Verify host/port reachability before running jobs","Monitor node restarts and network stability"],"tags":["easysearch","scroll","ioexception","network","cleanup"],"backgroundTag":"network-request-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}