apache/seatunnel · warning

DELETE {} response null when clearing scrollId {}

Error message

DELETE {} response null when clearing scrollId {}

What it means

A WARN logged by EasysearchClient.clearScroll when the REST client's performRequest for the scroll-clear DELETE returns null. The method returns false, meaning the server-side scroll context was not confirmed cleared and may linger until it times out.

Source

Thrown at seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java:310

            log.warn("close easysearch connection error", e);
        }
    }

    public boolean clearScroll(String scrollId) {
        if (scrollId == null || scrollId.isEmpty()) {
            return false;
        }

        String endpoint = "/_search/scroll";
        Request request = new Request("DELETE", endpoint);
        Map<String, String> param = new HashMap<>();
        param.put("scroll_id", scrollId);
        request.setJsonEntity(JsonUtils.toJsonString(param));

        try {
            Response response = restClient.performRequest(request);
            if (response == null) {
                log.warn("DELETE {} response null when clearing scrollId {}", endpoint, scrollId);
                return false;
            }
            int statusCode = response.getStatusLine().getStatusCode();
            if (statusCode == HttpStatus.SC_OK) {
                return true;
            } else {
                log.warn("Failed to clear scrollId {}, status code={}", scrollId, statusCode);
                return false;
            }
        } catch (IOException e) {
            log.warn("Error clearing scrollId " + scrollId, e);
            return false;
        }
    }

    /**
     * first time to request search documents by scroll call /${index}/_search?scroll=${scroll}
     *

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify the Easysearch endpoint supports the scroll-clear DELETE with a JSON body; check for intermediaries (proxies/LBs) that strip the body.
  2. Treat false as non-fatal — scroll contexts expire via the scroll TTL; rely on `keep-alive` settings instead.
  3. Retry clearScroll once on failure; check client/server logs for the underlying request issue.
  4. Upgrade the Easysearch/RestClient client if null responses are reproducible (client bug).
Defensive patterns

Strategy: retry

Try / catch

boolean cleared = client.clearScroll(scrollId);
if (!cleared) {
    log.info("scroll {} not cleared, will expire via TTL", scrollId); // non-fatal
}

Prevention

When it happens

Trigger: Calling clearScroll (invoked after finishing scroll pagination) when the low-level RestClient yields a null Response for the `/_search/scroll` DELETE request carrying the scroll_id.

Common situations: Rare RestClient/proxy edge cases; scroll already expired server-side and the endpoint responding abnormally; misconfigured custom endpoint/proxy that drops the DELETE body.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/4610f4b0df1cc802. Report an issue: GitHub.