From 73a2334dc8a0aa821402471eaa19b64d96cf8b27 Mon Sep 17 00:00:00 2001 From: Wu Shilin Date: Fri, 28 Aug 2026 16:24:25 +0800 Subject: [PATCH] [Improve](go) Align stream load retry policy with the Flink connector The Go SDK only retried HTTP 429/408/5xx. Doris reports almost every load failure as HTTP 200 + Status "Fail" -- including transient ones such as "[E-235] too many versions", "[E-238] too many segments", "current running txns on db ... larger than limit", memory limit exceeded and txn/publish timeouts -- so none of those were ever retried, while the Flink connector (DorisBatchStreamLoad.load) retries every failed load. Bring the Go SDK on par with the Flink connector: - classifyResponseError: every non-success outcome (non-2xx HTTP, or 2xx with a Status other than Success/Publish Timeout) is retriable. The only exception is "Label Already Exists" + ExistingJobStatus RUNNING, which stays ambiguous and is resolved by polling get_load_state. - New Config.MaxRetries / LoaderConfig.max_retries, default 3 (same as sink.max-retries); a batch is sent at most MaxRetries+1 times, still bounded by DorisUploadTimeout. Negative disables retries. - Every retry uses a fresh label