directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1373658 - /directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/txn/DefaultTxnManager.java
Date Wed, 15 Aug 2012 22:27:05 GMT
Author: gokturk
Date: Wed Aug 15 22:27:05 2012
New Revision: 1373658

URL: http://svn.apache.org/viewvc?rev=1373658&view=rev
Log:
* Last 2 commits are reverted:
1- shutdown already calles advanceCheckPoint() on latest flush lsn anchor
2- WAL is already synched to latest commit every time true sync flag.

Modified:
    directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/txn/DefaultTxnManager.java

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/txn/DefaultTxnManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/txn/DefaultTxnManager.java?rev=1373658&r1=1373657&r2=1373658&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/txn/DefaultTxnManager.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/txn/DefaultTxnManager.java
Wed Aug 15 22:27:05 2012
@@ -214,7 +214,7 @@ class DefaultTxnManager implements TxnMa
         {
             if ( !doNotFlush )
             {
-                flushTxns( true );
+                flushTxns();
             }
 
             advanceCheckPoint( lastFlushedLogAnchor );
@@ -444,7 +444,7 @@ class DefaultTxnManager implements TxnMa
 
         try
         {
-            flushTxns( false );
+            flushTxns();
         }
         catch ( Exception e )
         {
@@ -908,7 +908,7 @@ class DefaultTxnManager implements TxnMa
      *  @param shutdown is TxnManager is shutting down
      *
      */
-    private void flushTxns( boolean shutdown ) throws Exception
+    private void flushTxns() throws Exception
     {
         UserLogRecord lastLogRecord = null;
 
@@ -982,9 +982,6 @@ class DefaultTxnManager implements TxnMa
             partitionIt.next().sync();
         }
 
-        // Sync WAL to the last flushed LSN
-        wal.sync( latestFlushedLsn );
-
         numFlushes++;
 
         if ( lastLogRecord != null )
@@ -992,11 +989,7 @@ class DefaultTxnManager implements TxnMa
             lastFlushedLogAnchor.resetLogAnchor( lastLogRecord.getLogAnchor() );
         }
 
-        if ( shutdown )
-        {
-            advanceCheckPoint( lastFlushedLogAnchor );
-        }
-        else if ( numFlushes % DEFAULT_FLUSH_ROUNDS == 0 )
+        if ( numFlushes % DEFAULT_FLUSH_ROUNDS == 0 )
         {
             advanceCheckPoint( lastFlushedLogAnchor );
         }



Mime
View raw message