-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[opt](audit) use one line in audit log and origin statement in audit table #52032
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
98b06c5 to
6735857
Compare
06fd181 to
72fdf8d
Compare
|
run buildall |
TPC-H: Total hot run time: 34577 ms |
TPC-DS: Total hot run time: 185993 ms |
ClickBench: Total hot run time: 29.25 s |
FE UT Coverage ReportIncrement line coverage |
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 34266 ms |
TPC-DS: Total hot run time: 186068 ms |
ClickBench: Total hot run time: 29.29 s |
FE UT Coverage ReportIncrement line coverage |
…table (apache#52032) Previously, when auditing, we use replace all `\n`, `\t` in origin sql string with `\\n`, `\\t`, so that the sql string can be written in one line. But this lead to some problem: 1. User can not direct use the sql in audit log to execute. 2. Some replacement is wrong, eg, replace the `\n` in a quota string. This PR changes the logic: 1. For audit log, only replace `\n` with `\\n` to keep SQL in one line. 2. For audit table, keep the origin string. 3. Use special column and line separator for audit log load data, to avoid conflict with char in SQL
### What problem does this PR solve? Related PR: In this PR #52032 , the audit_log schema had changed, so the test need to fix
followup #52032, the separator is wrong
…table (apache#52032) Previously, when auditing, we use replace all `\n`, `\t` in origin sql string with `\\n`, `\\t`, so that the sql string can be written in one line. But this lead to some problem: 1. User can not direct use the sql in audit log to execute. 2. Some replacement is wrong, eg, replace the `\n` in a quota string. This PR changes the logic: 1. For audit log, only replace `\n` with `\\n` to keep SQL in one line. 2. For audit table, keep the origin string. 3. Use special column and line separator for audit log load data, to avoid conflict with char in SQL
### What problem does this PR solve? Related PR: In this PR apache#52032 , the audit_log schema had changed, so the test need to fix
…52968) followup apache#52032, the separator is wrong
What problem does this PR solve?
Previously, when auditing, we use replace all
\n,\tin origin sql string with\\n,\\t,so that the sql string can be written in one line. But this lead to some problem:
\nin a quota string.This PR changes the logic:
\nwith\\nto keep SQL in one line.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)