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



##########
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:
       Yes, Doris support empty rowset. Because when there are 10 tablets, but 
user could insert 1 row, and this row only exist in one tablet and other 
tablets have empty rowset.
   
   But, we should optimize this. If all tablets have empty rowsets, then just 
return success, not commit it, and abort the txn.




-- 
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