yujun777 opened a new pull request, #70895: URL: https://github.com/apache/doris/pull/70895
### Background Cloud FE fetches statistics for batches of tablets. For changelog tablets it also requests the published partition version associated with the row count. The response already supports omitting that version, and FE treats absent coverage as unknown. ### What problem does this PR solve? Issue Number: None Related PR: #69896 (introduced the optional row-count version read) PR Type: Bugfix Problem Summary: A read or parse error on an optional partition version aborts the tablet statistics batch. For example, a request with a malformed changelog tablet version followed by an ordinary tablet with 100 rows returns a non-OK status, and FE discards the response. With this change the batch returns both statistics entries, omits the affected tablet's version, and reports the ordinary tablet's 100 rows. ### Details - **Frequency:** Always when the optional lookup hits a read or parse error after the tablet stats were read successfully. - **Root cause:** GetTabletStats treated an optional coverage lookup like a tablet stats read error and returned an RPC-level failure before processing the rest of the batch. - **Why existing tests missed it:** The legacy and versioned GetTabletStats tests cover successful statistics reads, including valid coverage. The changelog SQL suites test the resulting row estimates without injecting a malformed optional version document into a mixed batch. - **Fix:** Keep the tablet stats, log the coverage error, and omit the optional field for the affected tablet. Missing partition versions still map to version 1 and errors when reading the stats themselves still fail the RPC. - **Other paths and branches:** The change covers both legacy and versioned Cloud metadata reads. The optional lookup is absent from the checked upstream 3.1, 4.0, 4.1, and 4.2 release branches. - **Behavior change:** An optional version-read error no longer discards independently readable tablet statistics in the same batch. ### Testing - Both new ASAN tests fail against the baseline at the batch status assertion. The legacy path returns 1006 (malformed partition version) and the versioned path returns 1003 (invalid data). - All five GetTabletStats tests passed in the ASAN Cloud test runner, including the two new mixed-batch cases, normal legacy and versioned reads, and the HTTP stats path. - Clang-format v16 and clang-tidy passed. No live-cluster regression was run. ### Release note Cloud tablet statistics remain available when an optional changelog row-count version lookup fails. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Ready -- 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]
