You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2018/01/02 22:44:21 UTC

[directory-mavibot] branch single-value updated: Commented the PageReclaimer code, it's not functional atm

This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch single-value
in repository https://gitbox.apache.org/repos/asf/directory-mavibot.git


The following commit(s) were added to refs/heads/single-value by this push:
     new b1c41ca  Commented the PageReclaimer code, it's not functional atm
b1c41ca is described below

commit b1c41cae7888c1c18f9c988212d4c78fad778382
Author: Emmanuel Lécharny <el...@symas.com>
AuthorDate: Tue Jan 2 23:44:20 2018 +0100

    Commented the PageReclaimer code, it's not functional atm
---
 .../apache/directory/mavibot/btree/PageReclaimer.java   |  6 ++++++
 .../directory/mavibot/btree/PageReclaimerTest.java      | 17 ++++++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageReclaimer.java b/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageReclaimer.java
index ee29549..88dcdf7 100644
--- a/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageReclaimer.java
+++ b/mavibot/src/main/java/org/apache/directory/mavibot/btree/PageReclaimer.java
@@ -64,6 +64,7 @@ public class PageReclaimer
     /* no qualifier */ void reclaim()
     {
         //System.out.println( "reclaiming pages" );
+        /*
         try
         {
             if ( running )
@@ -181,6 +182,7 @@ public class PageReclaimer
             LOG.warn( "Errors while reclaiming", e );
             throw new RuntimeException( e );
         }
+        */
     }
 
 
@@ -193,6 +195,7 @@ public class PageReclaimer
      */
     private List<RevisionOffsets> getRevisions( String name ) throws Exception
     {
+        /*
         TupleCursor<RevisionName, long[]> cursor = rm.copiedPageBtree.browse();
 
         List<RevisionOffsets> lst = new ArrayList<RevisionOffsets>();
@@ -211,5 +214,8 @@ public class PageReclaimer
         cursor.close();
         
         return lst;
+        */
+        
+        return null;
     }
 }
diff --git a/mavibot/src/test/java/org/apache/directory/mavibot/btree/PageReclaimerTest.java b/mavibot/src/test/java/org/apache/directory/mavibot/btree/PageReclaimerTest.java
index e973bdc..89aa585 100644
--- a/mavibot/src/test/java/org/apache/directory/mavibot/btree/PageReclaimerTest.java
+++ b/mavibot/src/test/java/org/apache/directory/mavibot/btree/PageReclaimerTest.java
@@ -61,6 +61,7 @@ public class PageReclaimerTest
 
     private File dbFile;
 
+    /*
 
     @Before
     public void setup() throws Exception
@@ -134,6 +135,7 @@ public class PageReclaimerTest
      * 
      * @throws Exception
      */
+    /*
     @Test
     public void testReclaimerWithMagicNum() throws Exception
     {
@@ -158,6 +160,7 @@ public class PageReclaimerTest
         
         assertEquals( count, total );
     }
+    */
 
     
     /**
@@ -165,6 +168,7 @@ public class PageReclaimerTest
      * 
      * @throws Exception
      */
+    /*
     @Test
     public void testReclaimerWithMultiThreads() throws Exception
     {
@@ -303,12 +307,11 @@ public class PageReclaimerTest
             }
         }
         
-        /*
-        System.out.println( "Total number of pages created " + manager.nbCreatedPages );
-        System.out.println( "Total number of pages reused " + manager.nbReusedPages );
-        System.out.println( "Total number of pages freed " + manager.nbFreedPages );
-        System.out.println( "Total file size (bytes) " + file.length() );
-        */
+        
+        //System.out.println( "Total number of pages created " + manager.nbCreatedPages );
+        //System.out.println( "Total number of pages reused " + manager.nbReusedPages );
+        //System.out.println( "Total number of pages freed " + manager.nbFreedPages );
+        //System.out.println( "Total file size (bytes) " + file.length() );
         
         long totalPages = file.length() / RecordManager.DEFAULT_PAGE_SIZE;
         
@@ -359,5 +362,5 @@ public class PageReclaimerTest
         //System.out.println("Unaccounted offsets " + unaccounted);
         assertEquals( 0, unaccounted.size() );
     }
-    
+    */
 }

-- 
To stop receiving notification emails like this one, please contact
['"commits@directory.apache.org" <co...@directory.apache.org>'].