directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1190227 - /directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogScanner.java
Date Fri, 28 Oct 2011 09:44:28 GMT
Author: saya
Date: Fri Oct 28 09:44:27 2011
New Revision: 1190227

URL: http://svn.apache.org/viewvc?rev=1190227&view=rev
Log:
another fix for prevlogfileoffset

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=1190227&r1=1190226&r2=1190227&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
Fri Oct 28 09:44:27 2011
@@ -122,10 +122,10 @@ public class DefaultLogScanner implement
                         markScanInvalid( null );
                     }
                     
-                    prevLogFileOffset = Math.max( startingOffset, currentLogFile.getLength()
);
+                    prevLogFileOffset = Math.min( startingOffset, currentLogFile.getLength()
);
                     
                     // Move to the beginning of the data we want to read.
-                    currentLogFile.seek( startingOffset );
+                    currentLogFile.seek( prevLogFileOffset );
                 }
                 
                 startingRead = true;
@@ -342,6 +342,7 @@ public class DefaultLogScanner implement
         
         // File exists
         prevLogFileNumber = logFileNumber;
+        prevLogFileOffset = 0;
         
         markerHead.rewind();
         



Mime
View raw message