cocoindex-io/cocoindex · error · DorisStreamLoadError

result.get("Message", "Unknown error")

Error message

result.get("Message", "Unknown error")

What it means

The stream load completed the HTTP call and returned JSON, but its Status field was neither 'Success' nor 'Publish Timeout'. The connector raises DorisStreamLoadError carrying Doris's own Message (defaulting to 'Unknown error' when absent), plus status, ErrorURL, and loaded/filtered row counts.

Source

Thrown at python/cocoindex/connectors/doris/_target.py:655

                text = await response.text()

        if status_code in (401, 403):
            raise DorisAuthError(
                f"Authentication failed: HTTP {status_code}",
                host=config.fe_host,
                port=config.fe_http_port,
            )

        try:
            result: dict[str, Any] = json.loads(text)
        except json.JSONDecodeError:
            raise DorisStreamLoadError(
                f"Invalid response: {text[:200]}", status="ParseError"
            )

        load_status = result.get("Status", "Unknown")
        if load_status not in ("Success", "Publish Timeout"):
            raise DorisStreamLoadError(
                result.get("Message", "Unknown error"),
                status=load_status,
                error_url=result.get("ErrorURL"),
                loaded_rows=result.get("NumberLoadedRows", 0),
                filtered_rows=result.get("NumberFilteredRows", 0),
            )
        return result

    retry_config = RetryConfig(
        max_retries=config.max_retries,
        base_delay=config.retry_base_delay,
        max_delay=config.retry_max_delay,
    )
    try:
        return await _with_retry(
            do_stream_load, retry_config, f"Stream Load to {table_name}"
        )
    finally:

View on GitHub (pinned to e84aa99b32)

Solutions

  1. Read the errorURL field in the exception to fetch per-row failure details from Doris
  2. Compare declared columns/types with the actual Doris table schema (run _generate_create_table_ddl output vs SHOW CREATE TABLE)
  3. Check loaded_rows/filtered_rows in the exception to see if rows were filtered by quality rules
  4. Avoid reusing stream load labels; use a fresh label per load
Defensive patterns

Strategy: try-catch

Try / catch

try:
    await target.sync()
except DorisStreamLoadError as e:
    logger.error("Load failed: status=%s rows=%s filtered=%s url=%s",
                 e.status, e.loaded_rows, e.filtered_rows, e.error_url)
    if e.error_url:
        details = await fetch(e.error_url)

Prevention

When it happens

Trigger: Doris rejects or partially fails the load: schema mismatch (wrong column count/types), fail-on-strict-quality filtering all rows, label already exists, or internal backend errors reported via Status values like 'Fail'/'Cancelled'.

Common situations: Record columns not matching the Doris table schema; all rows filtered due to data quality rules; duplicate stream load label reuse; disk full / backend failure.

Related errors


AI-assisted analysis of cocoindex-io/cocoindex@e84aa99b32 (2026-09-08). Data as JSON: /api/errors/cd2676b556b82dc0. Report an issue: GitHub.