Skip to content

branch-4.1: [fix](regression) match audit internal query error by injected tablet#65234

Open
shuke987 wants to merge 1 commit into
apache:branch-4.1from
shuke987:fix-branch41-audit-internal-query-failure
Open

branch-4.1: [fix](regression) match audit internal query error by injected tablet#65234
shuke987 wants to merge 1 commit into
apache:branch-4.1from
shuke987:fix-branch41-audit-internal-query-failure

Conversation

@shuke987

@shuke987 shuke987 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Proposed changes

test_audit_log_internal_query_failure validates that a failed internal stats
query is audited as ERR. The case currently finds the audit row by requiring
queried_tables_and_views to contain the exact user table name.

That auxiliary field is brittle for the failed internal-query path. In the
latest branch-4.1 failure, the injected tablet-scoped IO_ERROR happened, but
the audit lookup stayed empty because of the exact queried_tables_and_views
filter.

This PR keeps the product assertion but matches the audit row by the evidence
that uniquely belongs to this run:

  • is_internal = 1
  • state = 'ERR'
  • error_message contains IO_ERROR
  • error_message contains the injected tabletId
  • time >= startTime

It also logs the recent internal audit rows if the lookup still fails, so the
next failure is easier to diagnose.

Evidence

  • Branch-4.1 TeamCity history: 20 failures / 612 occurrences for
    fault_injection_p0.test_audit_log_internal_query_failure.test_audit_log_internal_query_failure.
  • Latest checked failure: build 985138 / PR 65191, assertion:
    expected an audit_log entry with state=ERR for the failed gather query.
  • Build 985138 reached the intended injected IO_ERROR during
    analyze table test_audit_log_internal_query_failure_t1 with sync.
  • Build 985138 used a branch-4.1 base containing branch-4.1: [fix](audit) serialize audit loader batch assembly #65107 #65132 before merging PR 65191,
    so this is not only the older audit-loader batch assembly race.

Testing

  • git diff --check
  • groovy -e 'new GroovyShell().parse(new File(args[0])); println "OK"' regression-test/suites/fault_injection_p0/test_audit_log_internal_query_failure.groovy

@shuke987 shuke987 requested a review from yiguolei as a code owner July 6, 2026 03:42
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@shuke987

shuke987 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

run buildall

@yiguolei

yiguolei commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

skip buildall

yiguolei
yiguolei previously approved these changes Jul 6, 2026
@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@shuke987 shuke987 force-pushed the fix-branch41-audit-internal-query-failure branch from 288fb27 to 9954d53 Compare July 6, 2026 09:30
@github-actions github-actions Bot removed the approved Indicates a PR has been approved by one committer. label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants