yujun777 commented on code in PR #62606:
URL: https://github.com/apache/doris/pull/62606#discussion_r3915015341
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java:
##########
@@ -109,10 +115,14 @@
* InsertIntoTableCommand(Query())
* ExplainCommand(Query())
*/
-public class InsertIntoTableCommand extends Command implements
NeedAuditEncryption, ForwardWithSync, Explainable {
+public class InsertIntoTableCommand extends Command
+ implements NeedAuditEncryption, ForwardWithSync, Explainable,
CancelableCommand {
public static final Logger LOG =
LogManager.getLogger(InsertIntoTableCommand.class);
+ private final AtomicBoolean isCancelled = new AtomicBoolean(false);
Review Comment:
Fixed in 10295e68806. `run` and `runWithUpdateInfo` now consume the pending
cancellation at the execution entrypoint with `isCancelled.getAndSet(false)`: a
cancel-before-run still aborts that invocation, and the flag is reset so a
reused command instance (server-side prepared INSERT) executes normally again
instead of silently succeeding without inserting. Covered by the new
`testRunConsumesPendingCancellationAndIsReusable`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]