Skip to content

[fix](auditlog) add missing audit log fields and duplicate audit log error - #42262

Merged
morningman merged 8 commits into
apache:masterfrom
morningman:audit_log_fix
Nov 2, 2024
Merged

[fix](auditlog) add missing audit log fields and duplicate audit log error#42262
morningman merged 8 commits into
apache:masterfrom
morningman:audit_log_fix

Conversation

@morningman

@morningmanmorningman commented Oct 22, 2024

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Problem Summary:

Issue 1

There are some fields that is missing in audit log table.
This PR add them all:

  • shuffle_send_rows
  • shuffle_send_bytes
  • scan_bytes_from_local_storage
  • scan_bytes_from_remote_storage
  • is_nereids
  • compute_group

Notice that compute_group is previously name cloudClusterName in fe.audit.log,
which is incorrect, so I change it to the right name.

After this PR, all these fields will be saved in both audit log table and fe.audit.log

Issue 2

The AuditEventBuilder need to be reset at each run, the there will be duplicate audit log.

Issue 3

Add a new statement call flush_audit_log(). It will flush the audit log immediately to audit_log table.
This is useful in test case, so that we don't need to wait 1min to flush the audit log data.

Check List (For Committer)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No colde files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes. cloudClusterName in fe.audit.log change to computeGroup. And some fields are added to the audit log table.
  • Does this need documentation?

    • No.
    • Yes. I will add this later
  • Release note

    fix add missing audit log fields and duplicate audit log error

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@doris-robot

Copy link
Copy Markdown

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@morningman
morningmanforce-pushed the audit_log_fix branch 3 times, most recently from d8dfde3 to 88f6f3eCompareOctober 31, 2024 04:02
@morningmanmorningman changed the title [fix](auditlog) add missing audit log fields[fix](auditlog) add missing audit log fields and duplicate audit log errorOct 31, 2024
@morningman
morningman marked this pull request as ready for review October 31, 2024 06:21
@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

yiguolei
yiguolei previously approved these changes Oct 31, 2024
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actionsgithub-actionsBot added approved Indicates a PR has been approved by one committer. reviewed labels Oct 31, 2024
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

@github-actionsgithub-actionsBot removed the approved Indicates a PR has been approved by one committer. label Oct 31, 2024
@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Nov 2, 2024
@morningman
morningman merged commit c354351 into apache:masterNov 2, 2024
github-actionsBot pushed a commit that referenced this pull request Nov 2, 2024
…error (#42262)
### What problem does this PR solve?
Problem Summary:
#### Issue 1
There are some fields that is missing in audit log table.
This PR add them all:
- shuffle_send_rows
- shuffle_send_bytes
- scan_bytes_from_local_storage
- scan_bytes_from_remote_storage
- is_nereids
- compute_group
Notice that `compute_group` is previously name `cloudClusterName` in
fe.audit.log,
which is incorrect, so I change it to the right name.
After this PR, all these fields will be saved in both audit log table
and fe.audit.log
#### Issue 2
The `AuditEventBuilder` need to be reset at each run, the there will be
duplicate audit log.
#### Issue 3
Add a new statement `call flush_audit_log()`. It will flush the audit
log immediately to audit_log table.
This is useful in test case, so that we don't need to wait 1min to flush
the audit log data.
### Release note
[fix](auditlog) add missing audit log fields and duplicate audit log error
@morningmanmorningman mentioned this pull request Nov 4, 2024
16 tasks
morningman added a commit to morningman/doris that referenced this pull request Nov 6, 2024
…error (apache#42262)
### What problem does this PR solve?
Problem Summary:
#### Issue 1
There are some fields that is missing in audit log table.
This PR add them all:
- shuffle_send_rows
- shuffle_send_bytes
- scan_bytes_from_local_storage
- scan_bytes_from_remote_storage
- is_nereids
- compute_group
Notice that `compute_group` is previously name `cloudClusterName` in
fe.audit.log,
which is incorrect, so I change it to the right name.
After this PR, all these fields will be saved in both audit log table
and fe.audit.log
#### Issue 2
The `AuditEventBuilder` need to be reset at each run, the there will be
duplicate audit log.
#### Issue 3
Add a new statement `call flush_audit_log()`. It will flush the audit
log immediately to audit_log table.
This is useful in test case, so that we don't need to wait 1min to flush
the audit log data.
### Release note
[fix](auditlog) add missing audit log fields and duplicate audit log error
@yiguoleiyiguolei mentioned this pull request Nov 6, 2024
morningman added a commit that referenced this pull request Nov 6, 2024
### What problem does this PR solve?
Problem Summary:
1. add some missing output blocks for `test_audit_log_behavior.out`
2. `call flush_audit_log()` does not support old planner, add check for
it. followup #42262
morningman added a commit that referenced this pull request Nov 6, 2024
morningman added a commit to morningman/doris that referenced this pull request Nov 6, 2024
### What problem does this PR solve?
Problem Summary:
1. add some missing output blocks for `test_audit_log_behavior.out`
2. `call flush_audit_log()` does not support old planner, add check for
it. followup apache#42262
@yiguoleiyiguolei mentioned this pull request Jan 19, 2025
yiguolei pushed a commit to apache/doris-website that referenced this pull request May 15, 2025
## Versions apache/doris#42262
this pr remove trace_id in audit_log
- [x] dev
- [x] 3.0
- [x] 2.1
- [ ] 2.0
## Languages
- [ ] Chinese
- [ ] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
…error (apache#42262)
### What problem does this PR solve?
Problem Summary:
#### Issue 1
There are some fields that is missing in audit log table.
This PR add them all:
- shuffle_send_rows
- shuffle_send_bytes
- scan_bytes_from_local_storage
- scan_bytes_from_remote_storage
- is_nereids
- compute_group
Notice that `compute_group` is previously name `cloudClusterName` in
fe.audit.log,
which is incorrect, so I change it to the right name.
After this PR, all these fields will be saved in both audit log table
and fe.audit.log
#### Issue 2
The `AuditEventBuilder` need to be reset at each run, the there will be
duplicate audit log.
#### Issue 3
Add a new statement `call flush_audit_log()`. It will flush the audit
log immediately to audit_log table.
This is useful in test case, so that we don't need to wait 1min to flush
the audit log data.
### Release note
[fix](auditlog) add missing audit log fields and duplicate audit log error
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
### What problem does this PR solve?
Problem Summary:
1. add some missing output blocks for `test_audit_log_behavior.out`
2. `call flush_audit_log()` does not support old planner, add check for
it. followup apache#42262
Sign up for freeto 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.

7 participants

@morningman@doris-robot@yiguolei@CalvinKirs@wuwenchi@gavinchou@wm1581066