You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by gi...@apache.org on 2024/02/24 03:46:58 UTC
(directory-site) branch asf-site updated: Updated site from master (1c8690bd3b90b1eaf5324de1c37dadc89a0e906f)
This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/directory-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new ff6515dd Updated site from master (1c8690bd3b90b1eaf5324de1c37dadc89a0e906f)
ff6515dd is described below
commit ff6515dd84757972760bca6ac33cdaa253672c7c
Author: jenkins <bu...@apache.org>
AuthorDate: Sat Feb 24 03:46:53 2024 +0000
Updated site from master (1c8690bd3b90b1eaf5324de1c37dadc89a0e906f)
---
content/api/download-old-versions.html | 20 +++++-----
content/index.xml | 2 +-
content/mavibot/index.xml | 2 +-
.../mavibot/user-guide-v1/1-initialization.html | 43 ++++++++++++----------
content/sitemap.xml | 8 ++--
5 files changed, 39 insertions(+), 36 deletions(-)
diff --git a/content/api/download-old-versions.html b/content/api/download-old-versions.html
index b94b090d..332e0571 100644
--- a/content/api/download-old-versions.html
+++ b/content/api/download-old-versions.html
@@ -153,37 +153,37 @@
<tr>
<td align="center">Apache LDAP API 2.1.5</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.1.5">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.5/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.5/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.1.5/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.5/xref/index.html">Xref</a></td>
<td align="center">12/Oct/2023</td>
</tr>
<tr>
<td align="center">Apache LDAP API 2.1.4</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.1.4">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.4/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.4/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.1.4/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.4/xref/index.html">Xref</a></td>
<td align="center">29/Aug/2023</td>
</tr>
<tr>
<td align="center">Apache LDAP API 2.1.3</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.1.3">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.3/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.3/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.1.3/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.3/xref/index.html">Xref</a></td>
<td align="center">09/Apr/2023</td>
</tr>
<tr>
<td align="center">Apache LDAP API 2.1.2</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.1.2">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.2/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.2/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.1.2/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.2/xref/index.html">Xref</a></td>
<td align="center">16/Aug/2022</td>
</tr>
<tr>
<td align="center">Apache LDAP API 2.1.1</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.1.1">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.1/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.1/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.1.1/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.1/xref/index.html">Xref</a></td>
<td align="center">08/Aug/2022</td>
</tr>
<tr>
<td align="center">Apache LDAP API 2.1.0</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.1.0">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.0/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.0/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.1.0/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.1.0/xref/index.html">Xref</a></td>
<td align="center">29/Jun/2021</td>
</tr>
</tbody>
@@ -203,19 +203,19 @@
<tr>
<td align="center">Apache LDAP API 2.0.2</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.0.2">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.2/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.2/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.0.2/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.2/xref/index.html">Xref</a></td>
<td align="center">25/May/2021</td>
</tr>
<tr>
<td align="center">Apache LDAP API 2.0.1</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.0.1">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.1/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.1/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.0.1/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.1/xref/index.html">Xref</a></td>
<td align="center">26/Mar/2020</td>
</tr>
<tr>
<td align="center">Apache LDAP API 2.0.0</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/2.0.0">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.0/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.0/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/2.0.0/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/2.0.0/xref/index.html">Xref</a></td>
<td align="center">13/Nov/2019</td>
</tr>
<tr>
@@ -260,7 +260,7 @@
<tr>
<td align="center">Apache LDAP API 1.0.2</td>
<td align="center"><a href="https://archive.apache.org/dist/directory/api/dist/1.0.2">Download</a></td>
-<td align="center"><a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/1.0.2/apidocs/index.html">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/1.0.2/xref/index.html">Xref</a></td>
+<td align="center"><a href="https://nightlies.apache.org/directory/api/1.0.2/apidocs/">Javadoc</a>, <a href="https://svn.apache.org/repos/infra/websites/production/directory/content/api/gen-docs/1.0.2/xref/index.html">Xref</a></td>
<td align="center">06/Jun/2018</td>
</tr>
<tr>
diff --git a/content/index.xml b/content/index.xml
index 8617e4fb..cf1822ba 100644
--- a/content/index.xml
+++ b/content/index.xml
@@ -151,7 +151,7 @@ Hopefully there&rsquo;s enough here to get you started &ndash; quickly.
<guid>https://directory.apache.org/mavibot/user-guide-v1/1-initialization.html</guid>
<description>Mavibot initialization The very first step when using Mavibot is to initialize it. That means creating the database that will contain all the data (we use only one file for that).
This is done with a simple call, with one or 3 parameters:
-RecordManager recordManager1 = new RecordManager( &#34;MyData.db&#34; ); // or RecordManager recordManager2 = new RecordManager( &#34;MyData.db&#34;, 512, 1024 ); The first method just require that you name the file that will contain the data (&ldquo;MyData.</description>
+RecordManager recordManager1 = new RecordManager( &#34;MyData.db&#34; ); // or RecordManager recordManager2 = new RecordManager( &#34;MyData.db&#34;, 512, 1024 ); The first method just requires that you name the file that will contain the data (&ldquo;MyData.</description>
</item>
<item>
diff --git a/content/mavibot/index.xml b/content/mavibot/index.xml
index 7d0a4b96..05abc452 100644
--- a/content/mavibot/index.xml
+++ b/content/mavibot/index.xml
@@ -27,7 +27,7 @@
<guid>https://directory.apache.org/mavibot/user-guide-v1/1-initialization.html</guid>
<description>Mavibot initialization The very first step when using Mavibot is to initialize it. That means creating the database that will contain all the data (we use only one file for that).
This is done with a simple call, with one or 3 parameters:
-RecordManager recordManager1 = new RecordManager( &#34;MyData.db&#34; ); // or RecordManager recordManager2 = new RecordManager( &#34;MyData.db&#34;, 512, 1024 ); The first method just require that you name the file that will contain the data (&ldquo;MyData.</description>
+RecordManager recordManager1 = new RecordManager( &#34;MyData.db&#34; ); // or RecordManager recordManager2 = new RecordManager( &#34;MyData.db&#34;, 512, 1024 ); The first method just requires that you name the file that will contain the data (&ldquo;MyData.</description>
</item>
<item>
diff --git a/content/mavibot/user-guide-v1/1-initialization.html b/content/mavibot/user-guide-v1/1-initialization.html
index 5d702f34..83c02014 100644
--- a/content/mavibot/user-guide-v1/1-initialization.html
+++ b/content/mavibot/user-guide-v1/1-initialization.html
@@ -159,15 +159,16 @@
<span style="color:#080;font-style:italic">// or
</span><span style="color:#080;font-style:italic"></span>
RecordManager recordManager2 <span style="color:#666">=</span> <span style="color:#a2f;font-weight:bold">new</span> RecordManager<span style="color:#666">(</span> <span style="color:#b44">"MyData.db"</span><span style="color:#666">,</span> 512<span style="color:#666">,</span> 1024 <span style="color:#666">)</span><span style="color:#666">;</span>
-</code></pre></div><p>The first method just require that you name the file that will contain the data (<em>“MyData.db”</em> here), teh second method allows you to configure the page size and teh cache size (in number of pages). Here, we set the page size to <em>512</em> bytes and the cache will store 1024 pages.</p>
-<p>Those call will create the inner structure needed to manage the database:</p>
+</code></pre></div><p>The first method just requires that you name the file that will contain the data (<em>“MyData.db”</em> here), the second method allows you to configure the page size and the cache size (in number of pages). Here, we set the page size to <em>512</em> bytes and the cache will store 1024 pages.</p>
+<p>Those calls will create the inner structure needed to manage the database:</p>
<ul>
<li>the <em>RecordManagerHeader</em></li>
<li>the <em>CopiedPagesBtree</em></li>
-<li>the list of active B-trees (currently containing no element, the previously created B-tree is a technical one)</li>
+<li>the list of active <em>B-trees</em> (currently containing no element, the previously created <em>B-tree</em> is a technical one)</li>
+<li>The page cache which holds frequently used pages (the number of cached pages defaults to 10 000)</li>
</ul>
<h2 id="the-recordmanagerheader">The RecordManagerHeader</h2>
-<p>This data structure is critical to <em>Mavibot</em>, it contains the root of all your database. It is stored with one single page, and is written in one single write operation, guaranteeing that once written, all the database is reachable. It cannot be corrupted. Worse case scenario, if it cannot be written, the previous version will always be available and point to the previous revision.</p>
+<p>This data structure is critical to <em>Mavibot</em>, it contains the root of all your databases. It is stored with one single page, and is written in one single write operation, guaranteeing that once written, all the databases are reachable. It cannot be corrupted. Worse case scenario, if it cannot be written, the previous version will always be available and point to the previous revision.</p>
<p>The inner structure of this page is the following:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-Text" data-lang="Text">+--------------------------+
| PageSize | 4 bytes : The size of a physical page (default to 4096)
@@ -189,17 +190,19 @@
<ul>
<li>the current revision</li>
<li>the pointer to the first free page (free pages are linked together in a list for the page allocator to use them)</li>
-<li>the pointer to the list of existing B-trees</li>
+<li>the pointer to the list of existing <em>B-trees</em></li>
<li>the pointer to the <em>CopiedPagesBtree</em> which is used to manage dead pages</li>
-<li>a unique page counter whicch is incremented after every write</li>
+<li>a unique page counter which is incremented after every write</li>
</ul>
-<p>When you use a <em>Mavibot</em> database, the system will always read this first page, and retrieve all the needed informations about the existing B-trees, plus some extra information to retreive dead pages if there was a crash beforehand. It’s critical to undestand that a crash will not corrupt the database, you will just lose the data that were written before the write transaction has been fully committed.</p>
-<h2 id="the-copiedpages-btree">The CopiedPages Btree</h2>
-<p>This is a technical B-tree that is used to keep a reference of all the pages that have been copied during a write transaction. That allows the system to reclaim the pages that are not anymore in use. The algorithm will be axplain later. Enough said that for every write operation, we keep track of every page that is copied in this B-tree. Note that unlike the other B-trees, this B-tree is not versionned (ie we discard the old <em>CopiedPagesBtree</em> pages immediately, they aren&rsquo [...]
+<p>When you use a <em>Mavibot</em> database, the system will always read this first page, and retrieve all the needed informations about the existing <em>B-trees</em>, plus some extra informations to retreive dead pages if there was a crash beforehand. It’s critical to understand that a crash will not corrupt the database, you will just lose the data that were written before the write transaction has been fully committed.</p>
+<h2 id="the-copiedpages-b-tree">The CopiedPages B-tree</h2>
+<p>This is a technical <em>B-tree</em> that is used to keep a reference of all the pages that have been copied during a write transaction. That allows the system to reclaim the pages that are not anymore in use. The algorithm will be explained later. Enough said that for every write operation, we keep a track of every page that is copied for this <em>B-tree</em>. Note that unlike the other <em>B-trees</em>, this <em>B-tree</em> is not versionned (ie we discard the old <em>CopiedPagesBtre [...]
+<p>In any case, this is just a plain <em>B-tree</em> like any others, except that we don’t keep many versions of it, only the last one, as it’s only updated when a write transaction is done.</p>
<h2 id="the-list-of-active-b-trees">The list of active B-trees</h2>
-<p>We need to keep a track of all the active B-trees, whatever their version. A B-ytree is active when there is at least a read transaction using the assocciated revision. We may have many.</p>
-<p>The reason we keep them on teh disk is that it helps to reclaim old pages in case of a crash, otherwise we would have to parse the whole database - which would be costly.</p>
-<p>Here is the data structure as it is written on disk - and it may span on many pages -:</p>
+<p>Every time a read transaction is started, it will use a set of <em>B-trees</em>.</p>
+<p>We need to keep a track of all the active <em>B-trees</em>, whatever their version. A <em>B-tree</em> is active when there is at least a read transaction using the assocciated revision. We may have many.</p>
+<p>The reason we keep them on disk is that it helps to reclaim old pages in case of a crash, otherwise we would have to parse the whole database - which would be costly.</p>
+<p>Here is the data structure as it is written on disk - and it may span on many pages - :</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-Text" data-lang="Text">
+--+--+--+--+--+--+--+--+
| | | | | | | | | pageID
@@ -229,25 +232,25 @@
| | | | | | | | | BtreeHeader offset x M, For each managed B-tree of RMH[i]
+--+--+--+--+--+--+--+--+
...
-</code></pre></div><p>Each transaction list has a size of <code>12 + (nb B-tree * 8)</code> bytes. For instance, if we manage 16 B-trees, that is 140 bytes (16 * 8 + 12 -> 140), and add the first 12 bytes for completion). If we have 10 active transactions, a 4096 bytes page will easily hold all of them (12 + 10 x 140 -> 1412 bytes).</p>
+</code></pre></div><p>Each transaction list has a size of <code>12 + (nb B-tree * 8)</code> bytes. For instance, if we manage 16 <em>B-trees</em>, that is 140 bytes (16 * 8 + 12 -> 140), and add the first 12 bytes for completion). If we have 10 active transactions, a 4096 bytes page will easily hold all of them (12 + 10 x 140 -> 1412 bytes).</p>
<h2 id="the-list-of-free-pages">The list of free pages</h2>
<p>This is basically a pointer to the first free page. All the freed pages are linked together. Their content is not flushed or cleared.</p>
<p>The principle is that when a page is freed, we attach it to the begining of this list, and it becomes the new head of the free pages list.</p>
<p>For the record, when <em>Mavibot</em> needs a new page to store some data, it will first fetch some from this list, and when this list get exhausted, then it will get a new page at the end of the file, growing the file in the process.</p>
<p>Here is a representation of this list:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-Text" data-lang="Text"> +-------------+---+ +-------------+---+ +-------------+---+
-Head -->| | o-+--->| | o-+--->| | x |
+Head -->| <link> | o-+--->| <link> | o-+--->| <link> | x |
+-------------+---+ +-------------+---+ +-------------+---+
</code></pre></div><p>Note that the links are offsets in the file, and that the pages may be spread all across the file (ie we can start with 0x2000, then jump to 0x4000, go back to 0x3000, etc).</p>
<h2 id="transaction-list">Transaction list</h2>
-<p>We have now created the database, we need to initialize the transaction list. The <em>transaction list</em> is a list that contains all the existing transactions, as soon as they are in use. That means:</p>
+<p>We have now created the database, we need to initialize the <em>transaction list</em>. The <em>transaction list</em> is a list that contains all the existing transactions, as soon as they are in use. That means:</p>
<ul>
<li>the newest revision (after a write)</li>
<li>any older revision for which a read transaction is sill holding a revision</li>
</ul>
-<p>When one start a read transaction, it always uses the current revision, but we may have other writes while the read transaction is still processing data (a read transaction can remain opened for a very long time). Of course, the database for this old revision is outdated, but this is the contract: a read transaction always uses pages created before or uup to the read revision. Any data added, moddified or removed since the beginning of the read transaction won’t be seen.</p>
+<p>When one start a read transaction, it always uses the current revision, but we may have other writes while the read transaction is still processing data (a read transaction can remain opened for a very long time). Of course, the database for this old revision is outdated, but this is the contract: a read transaction always uses pages created before or up to the read revision. Any data added, moddified or removed since the beginning of the read transaction won’t be seen.</p>
<h1 id="adding-a-b-tree">Adding a B-tree</h1>
-<p>As soon as the database has been initialized, we can now add a working B-tree. This is done with a <em>write transaction</em> that needs to be created:</p>
+<p>As soon as the database has been initialized, we can now add a working <em>B-tree</em>. This is done with a <em>write transaction</em> that needs to be created:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"> <span style="color:#a2f;font-weight:bold">try</span> <span style="color:#666">(</span> WriteTransaction writeTransaction <span style="color:#666">=</span> recordManager<span style="color:#666">.</span><span style="color:#b44">beginWriteTransaction</span><span style="color:#666">(</span><span style="color:#666">)</span> <span style="col [...]
<span style="color:#666">{</span>
<span style="color:#080;font-style:italic">// Create a new BTree with transaction and another one without
@@ -263,9 +266,9 @@ Head -->| | o-+--->| | o-+--->| | x
<span style="color:#666">}</span>
</code></pre></div><ul>
<li>We first create a <em>Write Transaction</em> in a <em>try_with_resource</em> block</li>
-<li>then we add a B-tree (here stroring <Long, String> tuples) in a try/catch sequence</li>
-<li>we handle a potential exception, and rollback explicitely the transaction in this case</li>
-<li>last, not least, the commit is implicit when the transaction is auto-closed</li>
+<li>Then we add a <em>B-tree</em> (here stroring <code><Long, String></code> tuples) in a <em>try/catch</em> sequence</li>
+<li>We handle a potential exception, and rollback explicitely the transaction in this case</li>
+<li>Last, not least, the commit is implicit when the transaction is auto-closed</li>
</ul>
<p>Note: We have to deal with the <em>abort()</em> call explicitely.</p>
<p>The <em>B-tree</em> creation is entirely managed by the <em>recordManager</em> instance. A <em>B_Tree</em> is a data structure holding tuples (<code><key, value></code>) into pages. It has at least three pages:</p>
diff --git a/content/sitemap.xml b/content/sitemap.xml
index 46e6a39f..f4b3f784 100644
--- a/content/sitemap.xml
+++ b/content/sitemap.xml
@@ -69,7 +69,7 @@
<url>
<loc>https://directory.apache.org/mavibot/user-guide-v1/1-initialization.html</loc>
- <lastmod>2022-08-17T15:47:50+02:00</lastmod>
+ <lastmod>2024-02-24T04:42:55+01:00</lastmod>
</url>
<url>
@@ -1739,7 +1739,7 @@
<url>
<loc>https://directory.apache.org/api.html</loc>
- <lastmod>2024-02-06T08:39:12+01:00</lastmod>
+ <lastmod>2024-02-24T04:42:55+01:00</lastmod>
</url>
<url>
@@ -1844,7 +1844,7 @@
<url>
<loc>https://directory.apache.org/api/download-old-versions.html</loc>
- <lastmod>2024-02-06T08:39:12+01:00</lastmod>
+ <lastmod>2024-02-24T04:42:55+01:00</lastmod>
</url>
<url>
@@ -2164,7 +2164,7 @@
<url>
<loc>https://directory.apache.org/mavibot.html</loc>
- <lastmod>2022-10-07T13:19:04+02:00</lastmod>
+ <lastmod>2024-02-24T04:42:55+01:00</lastmod>
</url>
<url>