You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ya...@apache.org on 2021/04/08 01:10:16 UTC

[incubator-doris] branch master updated: [Enhance] Filter all non-journal db when getting journal db names (#5605)

This is an automated email from the ASF dual-hosted git repository.

yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 621c89f  [Enhance] Filter all non-journal db when getting journal db names (#5605)
621c89f is described below

commit 621c89f7b9d8e3b5983813c3fd61b18019d32f95
Author: luozenglin <37...@users.noreply.github.com>
AuthorDate: Thu Apr 8 09:09:56 2021 +0800

    [Enhance] Filter all non-journal db when getting journal db names (#5605)
---
 .../java/org/apache/doris/journal/bdbje/BDBEnvironment.java   | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java b/fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java
index e098153..4c85cde 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java
@@ -43,6 +43,7 @@ import com.sleepycat.je.rep.StateChangeListener;
 import com.sleepycat.je.rep.util.DbResetRepGroup;
 import com.sleepycat.je.rep.util.ReplicationGroupAdmin;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
@@ -339,13 +340,11 @@ public class BDBEnvironment {
         
         if (names != null) {
             for (String name : names) {
-                // We don't count epochDB
-                if (name.equals("epochDB")) {
-                    continue;
+                if (StringUtils.isNumeric(name)) {
+                    ret.add(Long.parseLong(name));
+                } else {
+                    LOG.debug("get database names, skipped {}", name);
                 }
-                
-                long db = Long.parseLong(name);
-                ret.add(db);
             }
         }
         

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