directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1189785 - /directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogScanner.java
Date Thu, 27 Oct 2011 14:39:22 GMT
Author: saya
Date: Thu Oct 27 14:39:22 2011
New Revision: 1189785

URL: http://svn.apache.org/viewvc?rev=1189785&view=rev
Log:
last successful file offset should be advanced only after successful reads. Reverted the change
introduced during code cleanups.

Modified:
    directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogScanner.java

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogScanner.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogScanner.java?rev=1189785&r1=1189784&r2=1189785&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogScanner.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogScanner.java
Thu Oct 27 14:39:22 2011
@@ -347,7 +347,6 @@ public class DefaultLogScanner implement
         
         // Read the Header
         logFileReader.read( markerHead.array(), 0, LogFileRecords.LOG_FILE_HEADER_SIZE );
-        prevLogFileOffset = LogFileRecords.LOG_FILE_HEADER_SIZE;
         
         // The file number
         long persistedLogFileNumber = markerHead.getLong();
@@ -362,7 +361,11 @@ public class DefaultLogScanner implement
             markScanInvalid( null );
         }
         
-        // Everything is fine, return
+        
+        
+        // Everything is fine advance last good offset and return
+        prevLogFileOffset = LogFileRecords.LOG_FILE_HEADER_SIZE;
+        
         return logFileReader;
     }
     



Mime
View raw message