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


   **Describe the bug**
   When we add a new OBSERVER FE into an already running a long time cluster, 
the new FE throw exception like:
   ```
   2021-02-24 17:09:22,696 ERROR 1 [BDBJEJournal.open():319] catch an exception 
when setup bdb environment. will exit.
   java.lang.NumberFormatException: For input string: "2225350428"
        at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) 
~[?:?]
        at java.lang.Integer.parseInt(Integer.java:652) ~[?:?]
        at java.lang.Integer.parseInt(Integer.java:770) ~[?:?]
        at 
com.sleepycat.je.rep.InsufficientLogException.<init>(InsufficientLogException.java:218)
 ~[je-7.3.7.jar:7.3.7]
        at 
com.sleepycat.je.rep.impl.RepImpl.handleRestoreRequired(RepImpl.java:2296) 
~[je-7.3.7.jar:7.3.7]
        at 
com.sleepycat.je.recovery.RecoveryManager.findEndOfLog(RecoveryManager.java:543)
 ~[je-7.3.7.jar:7.3.7]
        at 
com.sleepycat.je.recovery.RecoveryManager.recover(RecoveryManager.java:339) 
~[je-7.3.7.jar:7.3.7]
        at 
com.sleepycat.je.dbi.EnvironmentImpl.finishInit(EnvironmentImpl.java:841) 
~[je-7.3.7.jar:7.3.7]
        at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:222) 
~[je-7.3.7.jar:7.3.7]
        at 
com.sleepycat.je.Environment.makeEnvironmentImpl(Environment.java:267) 
~[je-7.3.7.jar:7.3.7]
        at com.sleepycat.je.Environment.<init>(Environment.java:252) 
~[je-7.3.7.jar:7.3.7]
        at 
com.sleepycat.je.rep.ReplicatedEnvironment.<init>(ReplicatedEnvironment.java:607)
 ~[je-7.3.7.jar:7.3.7]
        at 
com.sleepycat.je.rep.ReplicatedEnvironment.<init>(ReplicatedEnvironment.java:466)
 ~[je-7.3.7.jar:7.3.7]
        at 
com.sleepycat.je.rep.ReplicatedEnvironment.<init>(ReplicatedEnvironment.java:540)
 ~[je-7.3.7.jar:7.3.7]
        at 
org.apache.doris.journal.bdbje.BDBEnvironment.setup(BDBEnvironment.java:149) 
~[palo-fe.jar:?]
        at 
org.apache.doris.journal.bdbje.BDBJEJournal.open(BDBJEJournal.java:316) 
[palo-fe.jar:?]
        at org.apache.doris.persist.EditLog.open(EditLog.java:788) 
[palo-fe.jar:?]
        at org.apache.doris.catalog.Catalog.initialize(Catalog.java:733) 
[palo-fe.jar:?]
        at org.apache.doris.PaloFe.start(PaloFe.java:111) [palo-fe.jar:?]
        at org.apache.doris.PaloFe.main(PaloFe.java:60) [palo-fe.jar:?]
   ```
   I checked the code of [bdb-je 7.3.7](https://github.com/bantudb/je), it 
seems it's **int** overflowed in 
[code](https://github.com/bantudb/je/blob/master/src/com/sleepycat/je/rep/InsufficientLogException.java#L218)
   
   The latest version of bdb-je has fixed the bug: 
https://docs.oracle.com/cd/E17277_02/html/changelog.html
   ```
   public InsufficientLogException(Properties properties,
                                       String helperHosts) {
           super(null, EnvironmentFailureReason.INSUFFICIENT_LOG);
   
           /*
            * Don't initialize the repImpl until it's needed. If we try to do
            * so in step2, we'll be in a loop, trying to recover an environment
            * from  within recovery.
            */
           String vlsnVal =  properties.getProperty(REFRESH_VLSN);
           this.refreshVLSN = new VLSN(Long.parseLong(vlsnVal));     // now use 
Long
           this.logProviders = new HashSet<>();
   
           if (helperHosts != null) {
               for (String hostPortPair : helperHosts.split(",")) {
                   final String hpp = hostPortPair.trim();
                   if (hpp.length() > 0) {
                       LogFileSource source = 
                           new LogFileSource("NoName", // not important
                                             NodeType.ELECTABLE.name(),
                                             HostPortPair.getHostname(hpp),
                                             HostPortPair.getPort(hpp));
                       logProviders.add(source);
                   }
               }
           }
           this.props = properties;
       }
   ```
   
   I've tried to upgrade com.sleepycat-je to 18.3.12, and found this issuse has 
been resolved and FE started normally.
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to