You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/04/07 11:39:41 UTC

[GitHub] [incubator-doris] luozenglin commented on a change in pull request #5605: [Enhance] Filter all non-journal db when getting journal db names

luozenglin commented on a change in pull request #5605:
URL: https://github.com/apache/incubator-doris/pull/5605#discussion_r608575258



##########
File path: fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java
##########
@@ -339,13 +339,12 @@ public void removeDatabase(String dbName) {
         
         if (names != null) {
             for (String name : names) {
-                // We don't count epochDB
-                if (name.equals("epochDB")) {
-                    continue;
+                try {
+                    long db = Long.parseLong(name);
+                    ret.add(db);
+                } catch (NumberFormatException e) {
+                    // non-journal db, such as "epochDB", will throw this exception. No need to deal with it.

Review comment:
       done

##########
File path: fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java
##########
@@ -339,13 +339,12 @@ public void removeDatabase(String dbName) {
         
         if (names != null) {
             for (String name : names) {
-                // We don't count epochDB
-                if (name.equals("epochDB")) {
-                    continue;
+                try {
+                    long db = Long.parseLong(name);
+                    ret.add(db);
+                } catch (NumberFormatException e) {

Review comment:
       done




-- 
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:
users@infra.apache.org



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