Selaa lähdekoodia

ZOOKEEPER-2279: QuorumPeer loadDataBase() error message is incorrect(Arshad Mohammad via rakeshr)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1705221 13f79535-47bb-0310-9956-ffa450edef68
Rakesh Radhakrishnan 9 vuotta sitten
vanhempi
commit
1ea6879ba7

+ 3 - 0
CHANGES.txt

@@ -170,6 +170,9 @@ BUGFIXES:
   ZOOKEEPER-2269: NullPointerException in RemotePeerBean
   ZOOKEEPER-2269: NullPointerException in RemotePeerBean
   (Arshad Mohammad via rgs)
   (Arshad Mohammad via rgs)
 
 
+  ZOOKEEPER-2279: QuorumPeer loadDataBase() error message is incorrect
+  (Arshad Mohammad via rakeshr)
+
 IMPROVEMENTS:
 IMPROVEMENTS:
   ZOOKEEPER-1660 Documentation for Dynamic Reconfiguration (Reed Wanderman-Milne via shralex)  
   ZOOKEEPER-1660 Documentation for Dynamic Reconfiguration (Reed Wanderman-Milne via shralex)  
 
 

+ 1 - 1
src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java

@@ -762,7 +762,7 @@ public class QuorumPeer extends ZooKeeperThread implements QuorumStats.Provider
             	writeLongToFile(ACCEPTED_EPOCH_FILENAME, acceptedEpoch);
             	writeLongToFile(ACCEPTED_EPOCH_FILENAME, acceptedEpoch);
             }
             }
             if (acceptedEpoch < currentEpoch) {
             if (acceptedEpoch < currentEpoch) {
-                throw new IOException("The current epoch, " + ZxidUtils.zxidToString(currentEpoch) + " is less than the accepted epoch, " + ZxidUtils.zxidToString(acceptedEpoch));
+                throw new IOException("The accepted epoch, " + ZxidUtils.zxidToString(acceptedEpoch) + " is less than the current epoch, " + ZxidUtils.zxidToString(currentEpoch));
             }
             }
         } catch(IOException ie) {
         } catch(IOException ie) {
             LOG.error("Unable to load database on disk", ie);
             LOG.error("Unable to load database on disk", ie);