directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1621482 - in /directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree: BTreeTypeEnum.java PersistedBTree.java
Date Sat, 30 Aug 2014 16:19:39 GMT
Author: kayyagari
Date: Sat Aug 30 16:19:39 2014
New Revision: 1621482

URL: http://svn.apache.org/r1621482
Log:
removed COPIED_PAGES_BTREE type

Modified:
    directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeTypeEnum.java
    directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java

Modified: directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeTypeEnum.java
URL: http://svn.apache.org/viewvc/directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeTypeEnum.java?rev=1621482&r1=1621481&r2=1621482&view=diff
==============================================================================
--- directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeTypeEnum.java
(original)
+++ directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/BTreeTypeEnum.java
Sat Aug 30 16:19:39 2014
@@ -47,9 +47,6 @@ public enum BTreeTypeEnum
     /** Persisted Management B-tree */
     BTREE_OF_BTREES,
 
-    /** Persisted Management B-tree */
-    COPIED_PAGES_BTREE,
-
     /** In-memory B-tree but saved on disk */
     BACKED_ON_DISK
 }

Modified: directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
URL: http://svn.apache.org/viewvc/directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java?rev=1621482&r1=1621481&r2=1621482&view=diff
==============================================================================
--- directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
(original)
+++ directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
Sat Aug 30 16:19:39 2014
@@ -125,7 +125,6 @@ public class PersistedBTree<K, V> extend
         switch ( btreeType )
         {
             case BTREE_OF_BTREES :
-            case COPIED_PAGES_BTREE :
                 // We will create a new cache and a new readTransactions map 
                 init( null );
                 currentBtreeHeader = btreeHeader;
@@ -341,7 +340,7 @@ public class PersistedBTree<K, V> extend
 
         // Inject the old B-tree header into the pages to be freed
         // if we are deleting an element from a management BTree
-        if ( ( btreeType == BTreeTypeEnum.BTREE_OF_BTREES ) || ( btreeType == BTreeTypeEnum.COPIED_PAGES_BTREE
) )
+        if ( ( btreeType == BTreeTypeEnum.BTREE_OF_BTREES ) || ( btreeType == BTreeTypeEnum.PERSISTED_SUB
) )
         {
             PageIO[] pageIos = recordManager.readPageIOs( btreeHeader.getBTreeHeaderOffset(),
-1L );
 
@@ -408,18 +407,6 @@ public class PersistedBTree<K, V> extend
 
                 break;
 
-            case COPIED_PAGES_BTREE :
-                // The B-tree of B-trees or the copiedPages B-tree has been updated, update
the RMheader parameters
-                recordManager.updateRecordManagerHeader( -1L, newBtreeHeaderOffset );
-
-                // We can free the copied pages
-                recordManager.freePages( this, revision, result.getCopiedPages() );
-
-                // Store the new revision
-                storeRevision( newBtreeHeader, recordManager.isKeepRevisions() );
-
-                break;
-
             default:
                 // Nothing to do for sub-btrees
                 break;
@@ -479,9 +466,6 @@ public class PersistedBTree<K, V> extend
             case BTREE_OF_BTREES : 
                 return recordManager.getNewBTreeHeader( RecordManager.BTREE_OF_BTREES_NAME
);
                     
-            case COPIED_PAGES_BTREE : 
-                return recordManager.getNewBTreeHeader( RecordManager.COPIED_PAGE_BTREE_NAME
);
-                
             default : 
                 return recordManager.getBTreeHeader( getName() );
         }
@@ -520,7 +504,7 @@ public class PersistedBTree<K, V> extend
 
         // Inject the old B-tree header into the pages to be freed
         // if we are inserting an element in a management BTree
-        if ( ( btreeType == BTreeTypeEnum.BTREE_OF_BTREES ) || ( btreeType == BTreeTypeEnum.COPIED_PAGES_BTREE
) )
+        if ( ( btreeType == BTreeTypeEnum.BTREE_OF_BTREES ) || ( btreeType == BTreeTypeEnum.PERSISTED_SUB
) )
         {
             PageIO[] pageIos = recordManager.readPageIOs( btreeHeader.getBTreeHeaderOffset(),
-1L );
 
@@ -615,18 +599,6 @@ public class PersistedBTree<K, V> extend
 
                 break;
 
-            case COPIED_PAGES_BTREE :
-                // The B-tree of B-trees or the copiedPages B-tree has been updated, update
the RMheader parameters
-                recordManager.updateRecordManagerHeader( -1L, newBtreeHeaderOffset );
-
-                // We can free the copied pages
-                recordManager.freePages( this, revision, result.getCopiedPages() );
-
-                // Store the new revision
-                storeRevision( newBtreeHeader, recordManager.isKeepRevisions() );
-
-                break;
-
             default:
                 // Nothing to do for sub-btrees
                 break;



Mime
View raw message