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



##########
File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -2666,6 +2666,13 @@ public void dropDb(DropDbStmt stmt) throws DdlException {
             Database db = this.fullNameToDb.get(dbName);
             db.writeLock();
             try {
+                if (stmt.isNeedCheckCommittedTxns()) {
+                    if 
(Catalog.getCurrentCatalog().getGlobalTransactionMgr().existCommittedTxns(db.getId(),
 null, null)) {
+                       throw new DdlException("There are still some 
transactions in the COMMITTED state waiting to be completed. " +
+                               "The database [" + dbName +"] cannot be 
dropped. If you want to forcibly drop(cannot be recovered)," +
+                               " please use \"DROP database force\".");
+                    }

Review comment:
       ok




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

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