starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[Enhancement] Add transmitted bytes to FE Auditlog

Open siqi-celonis opened this issue 8 months ago • 4 comments

Why I'm doing:

I want to get how expensive a query is in terms of network usage quickly from the DD log instead of from the query profile. The enhancement can allow us to find out which queries that take the most network resources easily from the DD log. Otherwise, we can only get the most network usage queries by checking out all the query profiles individually.

What I'm doing:

I tried to add the transmitted bytes into the FE AuditLog. I open the PR for review ignoring the test coverage CI since I cannot figure out how to add unit tests for the AuditLog.

What type of PR is this:

  • [ ] BugFix
  • [ ] Feature
  • [x] Enhancement
  • [ ] Refactor
  • [ ] UT
  • [ ] Doc
  • [ ] Tool

Does this PR entail a change in behavior?

  • [x] Yes, this PR will result in a change in behavior.
  • [ ] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • [x] Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • [ ] Parameter changes: default values, similar parameters but with different default values
  • [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
  • [ ] Feature removed
  • [ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • [ ] I have added test cases for my bug fix or my new feature
  • [ ] This pr needs user documentation (for new or modified features or behaviors)
    • [ ] I have added documentation for my new feature or new function
  • [ ] This is a backport pr

Bugfix cherry-pick branch check:

  • [x] I have checked the version labels which the pr will be auto-backported to the target branch
    • [ ] 3.5
    • [ ] 3.4
    • [x] 3.3
    • [ ] 3.2
    • [ ] 3.1

siqi-celonis avatar Apr 24 '25 07:04 siqi-celonis

[Java-Extensions Incremental Coverage Report]

:white_check_mark: pass : 0 / 0 (0%)

github-actions[bot] avatar Jun 18 '25 16:06 github-actions[bot]

[FE Incremental Coverage Report]

:white_check_mark: pass : 12 / 14 (85.71%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: com/starrocks/common/util/AuditStatisticsUtil.java 5 7 71.43% [95, 155]
:large_blue_circle: com/starrocks/plugin/AuditEvent.java 6 6 100.00% []
:large_blue_circle: com/starrocks/qe/StmtExecutor.java 1 1 100.00% []

github-actions[bot] avatar Jun 18 '25 16:06 github-actions[bot]

[BE Incremental Coverage Report]

:white_check_mark: pass : 38 / 38 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: be/src/exec/pipeline/exchange/exchange_sink_operator.cpp 7 7 100.00% []
:large_blue_circle: be/src/runtime/query_statistics.h 1 1 100.00% []
:large_blue_circle: be/src/exec/pipeline/exchange/sink_buffer.h 5 5 100.00% []
:large_blue_circle: be/src/exec/pipeline/query_context.h 2 2 100.00% []
:large_blue_circle: be/src/runtime/query_statistics.cpp 8 8 100.00% []
:large_blue_circle: be/src/exec/pipeline/exchange/sink_buffer.cpp 11 11 100.00% []
:large_blue_circle: be/src/exec/pipeline/exchange/exchange_sink_operator.h 1 1 100.00% []
:large_blue_circle: be/src/exec/pipeline/query_context.cpp 3 3 100.00% []

github-actions[bot] avatar Jun 18 '25 16:06 github-actions[bot]

@Mergifyio backport branch-3.3

github-actions[bot] avatar Jun 24 '25 06:06 github-actions[bot]

backport branch-3.3

✅ Backports have been created

mergify[bot] avatar Jun 24 '25 06:06 mergify[bot]

ignore merge 3.4.5

jaogoy avatar Jun 25 '25 01:06 jaogoy

ignore backport check: 3.4.5

murphyatwork avatar Jun 26 '25 05:06 murphyatwork

@Mergifyio backport branch-3.5 branch-3.4

murphyatwork avatar Jun 26 '25 05:06 murphyatwork

backport branch-3.5 branch-3.4

✅ Backports have been created

mergify[bot] avatar Jun 26 '25 05:06 mergify[bot]