caiconghui commented on a change in pull request #7240:
URL: https://github.com/apache/incubator-doris/pull/7240#discussion_r777792407



##########
File path: 
fe/fe-core/src/main/java/org/apache/doris/load/update/UpdateStmtExecutor.java
##########
@@ -177,21 +176,7 @@ private void executePlan() throws Exception {
 
     private void commitAndPublishTxn() throws UserException {
         GlobalTransactionMgr globalTransactionMgr = 
Catalog.getCurrentGlobalTransactionMgr();
-        // situation1: no data is updated, abort transaction
-        if (effectRows == 0) {
-            LOG.info("abort transaction for update stmt, query id:{}, reason: 
{}", DebugUtil.printId(queryId),
-                    TransactionCommitFailedException.NO_DATA_TO_LOAD_MSG);
-            globalTransactionMgr.abortTransaction(dbId, txnId, 
TransactionCommitFailedException.NO_DATA_TO_LOAD_MSG);
-            StringBuilder sb = new StringBuilder();
-            sb.append("{'label':'").append(label);
-            sb.append(", 'txnId':'").append(txnId).append("'");
-            sb.append(", 
'queryId':'").append(DebugUtil.printId(queryId)).append("'");
-            sb.append("}");
-            analyzer.getContext().getState().setOk(effectRows, 0, 
sb.toString());
-            return;

Review comment:
       @yiguolei now, commit and publish txn without any tablet  almost cost 
nothing, we should unity it to avoid user to load data again, because no 
partition with data load may have some cases for normal and unnormal situation, 
and we may write extra code to handle this case for insert and update, which 
make code look like ugly and may not easy to handle 




-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to