Explorar el Código

ZOOKEEPER-199. fix log messages in persistence code

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@706512 13f79535-47bb-0310-9956-ffa450edef68
Patrick D. Hunt hace 16 años
padre
commit
c6acf2c2e3

+ 2 - 0
CHANGES.txt

@@ -35,6 +35,8 @@ Backward compatibile changes:
 
   BUGFIXES: 
 
+  ZOOKEEPER-199. fix log messages in persistence code (mahadev via phunt)
+
   ZOOKEEPER-197. create checksums for snapshots (mahadev via phunt)
 
   ZOOKEEPER-198. apache license header missing from FollowerSyncRequest.java

+ 2 - 2
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java

@@ -438,7 +438,7 @@ public class FileTxnLog implements TxnLog {
                 hdr = new TxnHeader();
                 record = SerializeUtils.deserializeTxn(iab, hdr);
             } catch (EOFException e) {
-                LOG.info("EOF excepton " + e);
+                LOG.debug("EOF excepton " + e);
                 inputStream.close();
                 inputStream = null;
                 // thsi means that the file has ended 
@@ -477,4 +477,4 @@ public class FileTxnLog implements TxnLog {
         }
     }
 
-}
+}

+ 3 - 3
src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java

@@ -110,8 +110,8 @@ public class FileTxnSnapLog {
                 //empty logs 
                 return dt.lastProcessedZxid;
             }
-            if (hdr.getZxid() <= highestZxid && highestZxid != 0) {
-                LOG.error(highestZxid + "(higestZxid) >= "
+            if (hdr.getZxid() < highestZxid && highestZxid != 0) {
+                LOG.error(highestZxid + "(higestZxid) > "
                         + hdr.getZxid() + "(next log) for type "
                         + hdr.getType());
             } else {
@@ -243,4 +243,4 @@ public class FileTxnSnapLog {
         txnLog.rollLog();
     }
     
-}
+}