-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BugFix] Support audit for insert into statement executing from follower #30663
Conversation
590bc28
to
46b9bdf
Compare
@@ -480,6 +480,10 @@ public void execute() throws Exception { | |||
// Write the resource group information to audit log. | |||
prepareResourceGroup(context, ResourceGroupClassifier.QueryType.fromStatement(parsedStmt)); | |||
|
|||
Preconditions.checkState(!(parsedStmt instanceof InsertStmt && parsedStmt.isExplain() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not forward to leader FE?
@@ -1368,6 +1372,9 @@ private void handleShow() throws IOException, AnalysisException, DdlException { | |||
} | |||
|
|||
private void handleExplainStmt(String explainString) throws IOException { | |||
if (explainString == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why explainString could be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
faa4edb
to
4bafe8a
Compare
4405320
to
8953f42
Compare
Signed-off-by: liuyehcf <1559500551@qq.com>
8953f42
to
8f28f9a
Compare
Kudos, SonarCloud Quality Gate passed! |
[FE Incremental Coverage Report]😞 fail : 62 / 117 (52.99%) file detail
|
[BE Incremental Coverage Report]😞 fail : 0 / 38 (00.00%) file detail
|
@Mergifyio backport branch-3.0 |
@Mergifyio backport branch-2.5 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
…wer (#30663) Signed-off-by: liuyehcf <1559500551@qq.com> (cherry picked from commit 4a6b0c9) # Conflicts: # be/src/exec/pipeline/result_sink_operator.h # fe/fe-core/src/main/java/com/starrocks/qe/ConnectProcessor.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java
…wer (#30663) Signed-off-by: liuyehcf <1559500551@qq.com> (cherry picked from commit 4a6b0c9) # Conflicts: # be/src/exec/pipeline/olap_table_sink_operator.cpp # be/src/exec/pipeline/olap_table_sink_operator.h # be/src/exec/pipeline/result_sink_operator.h # be/src/exec/pipeline/sink/export_sink_operator.cpp # be/src/exec/pipeline/sink/export_sink_operator.h # be/src/exec/pipeline/sink/iceberg_table_sink_operator.cpp # be/src/exec/pipeline/sink/iceberg_table_sink_operator.h # be/src/exec/pipeline/sink/memory_scratch_sink_operator.cpp # be/src/exec/pipeline/sink/memory_scratch_sink_operator.h # fe/fe-core/src/main/java/com/starrocks/qe/ConnectProcessor.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java
…wer (#30663) Signed-off-by: liuyehcf <1559500551@qq.com> (cherry picked from commit 4a6b0c9) # Conflicts: # be/src/exec/pipeline/olap_table_sink_operator.cpp # be/src/exec/pipeline/olap_table_sink_operator.h # be/src/exec/pipeline/result_sink_operator.h # be/src/exec/pipeline/sink/export_sink_operator.cpp # be/src/exec/pipeline/sink/export_sink_operator.h # be/src/exec/pipeline/sink/iceberg_table_sink_operator.cpp # be/src/exec/pipeline/sink/iceberg_table_sink_operator.h # be/src/exec/pipeline/sink/memory_scratch_sink_operator.cpp # be/src/exec/pipeline/sink/memory_scratch_sink_operator.h # fe/fe-core/src/main/java/com/starrocks/qe/ConnectProcessor.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/LeaderOpExecutor.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java # gensrc/thrift/FrontendService.thrift
@Mergifyio backport branch-3.2 |
✅ Backports have been created
|
…wer (#30663) Signed-off-by: liuyehcf <1559500551@qq.com> (cherry picked from commit 4a6b0c9) # Conflicts: # be/src/exec/pipeline/result_sink_operator.h # fe/fe-core/src/main/java/com/starrocks/qe/ConnectProcessor.java # fe/fe-core/src/main/java/com/starrocks/qe/LeaderOpExecutor.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java # gensrc/thrift/FrontendService.thrift
This is an continuation work of #29901, and it cannot work well when there are multi frontend instances.
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: