Skip to content

Conversation

@morningman
Copy link
Contributor

bp #50357

Problem Summary:

After query finished, the audit event will be created and:
1. Try to put into `queryAuditEventList` in `WorkloadRuntimeStatusMgr`

`WorkloadRuntimeStatusMgr` has a background thread to visit
`queryAuditEventList`, try to wait for
the statistic info of the event(such as scan rows, cpu time, etc.)
before logging this event.

The size of `queryAuditEventList` is very large, default is `250000`,
which is configured by FE config
`audit_event_log_queue_size`. So that it can always hold all events
within a certain period (typically, 5 seconds).

2. If `queryAuditEventList` is full, the statistic info of this audit
event will be ignored, and event will be logged directly.

Either the event has the statistic info or not, it will be put into a
`eventQueue` in `AuditEventProcessor`.
But this queue only has capacity of `10000`, which may not enough to
cache all events in a certain periods.
So some of audit event will be discarded and lost.

This PR mainly changes:
1. Use the same config `audit_event_log_queue_size` as the max size of
`eventQueue`.
2. Change some log message for easy debugging in future.
@morningman morningman requested a review from yiguolei as a code owner April 28, 2025 07:13
@hello-stephen
Copy link
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?

@morningman
Copy link
Contributor Author

run buildall

@morningman
Copy link
Contributor Author

run buildall

@morningman
Copy link
Contributor Author

run buildall

@yiguolei yiguolei merged commit 2b62fb1 into apache:branch-2.1 Apr 29, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants