morningman opened a new issue, #717: URL: https://github.com/apache/doris-flink-connector/issues/717
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/doris-flink-connector/issues?q=is%3Aissue) and found no similar issues. ### Version master @ 9550f9a0ebb16d95964ec65340f877b120f15403 (2026-11-05). ### What's Wrong? Each incremental window starts with tablet discovery: the enumerator posts the window's `@incr` query to `_query_plan?forward=true` and uses the planned tablets ([RestService.java#L739-L800](https://github.com/apache/doris-flink-connector/blob/9550f9a0ebb16d95964ec65340f877b120f15403/flink-doris-connector/flink-doris-connector-base/src/main/java/org/apache/doris/flink/rest/RestService.java#L739-L800)). Planning an `@incr` query runs Doris's visibility checks for the window, so the FE can return a transient "window not ready" or visibility-wait timeout error. That error is not retried: - `send()` retries only transport failures and empty responses ([RestService.java#L183-L240](https://github.com/apache/doris-flink-connector/blob/9550f9a0ebb16d95964ec65340f877b120f15403/flink-doris-connector/flink-doris-connector-base/src/main/java/org/apache/doris/flink/rest/RestService.java#L183-L240)); - the error is wrapped into `DorisRuntimeException("Failed to discover incremental tablets")` ([DorisSourceSplitAssigner.java#L317-L327](https://github.com/apache/doris-flink-connector/blob/9550f9a0ebb16d95964ec65340f877b120f15403/flink-doris-connector/flink-doris-connector-base/src/main/java/org/apache/doris/flink/source/assigners/DorisSourceSplitAssigner.java#L317-L327)); - `handleDiscoveredEndTimestamp()` rethrows it on the coordinator through `failOnError()` ([DorisSourceEnumerator.java#L160-L176](https://github.com/apache/doris-flink-connector/blob/9550f9a0ebb16d95964ec65340f877b120f15403/flink-doris-connector/flink-doris-connector-base/src/main/java/org/apache/doris/flink/source/enumerator/DorisSourceEnumerator.java#L160-L176)), which fails the whole job. Reader-side queries, by contrast, retry the same window on 5101 for up to `source.changelog.visible-wait-timeout` ([DorisFlightValueReader.java#L150-L172](https://github.com/apache/doris-flink-connector/blob/9550f9a0ebb16d95964ec65340f877b120f15403/flink-doris-connector/flink-doris-connector-base/src/main/java/org/apache/doris/flink/source/reader/DorisFlightValueReader.java#L150-L172)). ### What You Expected? Discovery treats window-not-ready and visibility-wait timeouts as retryable for the same window, within `source.changelog.visible-wait-timeout`, as the reader does, instead of triggering a global failover. ### How to Reproduce? 1. Make the Doris visibility wait time out during discovery, for example with a load on the source table that stays open longer than `change_visible_timeout_ms` in a shared-nothing cluster. 2. Observe that the Flink job fails over globally with `Failed to discover incremental tablets`, rather than retrying the window. ### Anything Else? Found by code reading while documenting the incremental source; not yet reproduced. Related Doris-side gap: in shared-nothing mode the visibility-wait timeout is reported without the 5101 code, see apache/doris#70279. ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
