weizuo93 opened a new issue #6509:
URL: https://github.com/apache/incubator-doris/issues/6509


   When executing `insert into select ...`, If the amount of data inserted is 0 
rows, `show load` can not work well for this insert operation.
   
   ```
   mysql> select * from table_test where citycode < 0;
   Empty set (0.03 sec)
   
   mysql> insert into table_test with label `label-2` select * from table_test 
where citycode < 0;
   Query OK, 0 rows affected (0.09 sec)
   
   mysql> show load where label = 'label-2';
   Empty set (0.01 sec)
   ```
   
   I found it in log that the transaction for this insert operation has been 
aborted due to `all partitions have no load data`.
   
   ```
   2021-08-25 16:28:19,326 INFO (doris-mysql-nio-pool-2|166) 
[DatabaseTransactionMgr.beginTransaction():304] begin transaction: txn id 54038 
with label label-2 from coordinator FE: xxxxxx, listner id: -1
   2021-08-25 16:28:19,329 INFO (doris-mysql-nio-pool-2|166) 
[StmtExecutor.handleInsertStmt():1167] Do insert [label-2] with query id: 
10b8c635d6184c0d-999b0c1088bb2165
   2021-08-25 16:28:19,410 INFO (doris-mysql-nio-pool-2|166) 
[DatabaseTransactionMgr.abortTransaction():1029] abort transaction: 
TransactionState. transaction id: 54038, label: label-2, db id: 10002, table id 
list: 67537, callback id: -1, coordinator: FE: xxxxxxxx, transaction status: 
ABORTED, error replicas num: 0, replica ids: , prepare time: 1629880099326, 
commit time: -1, finish time: 1629880099336, reason: all partitions have no 
load data successfully
   ```
   
   I think this  insert operation should be shown by `show load`.


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

Reply via email to