Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Nov 2, 2024

Conversation

morningman
Copy link
Contributor

@morningman morningman commented Oct 22, 2024

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

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 morningman force-pushed the audit_log_fix branch 3 times, most recently from d8dfde3 to 88f6f3e Compare October 31, 2024 04:02
@morningman morningman changed the title [fix](auditlog) add missing audit log fields [fix](auditlog) add missing audit log fields and duplicate audit log error Oct 31, 2024
@morningman morningman marked this pull request as ready for review October 31, 2024 06:21
@morningman
Copy link
Contributor Author

run buildall

yiguolei
yiguolei previously approved these changes Oct 31, 2024
Copy link
Contributor

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Oct 31, 2024
Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Oct 31, 2024
@morningman
Copy link
Contributor Author

run buildall

@morningman
Copy link
Contributor Author

run buildall

@morningman
Copy link
Contributor Author

run buildall

@morningman
Copy link
Contributor Author

run buildall

@morningman
Copy link
Contributor Author

run buildall

@morningman
Copy link
Contributor Author

run buildall

Copy link
Contributor

github-actions bot commented Nov 2, 2024

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 2, 2024
@morningman morningman merged commit c354351 into apache:master Nov 2, 2024
26 of 27 checks passed
github-actions bot 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
@morningman morningman 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
@yiguolei yiguolei 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
@gavinchou gavinchou added the cir label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants