directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Directory SandBox > TxnLogManager architecture
Date Thu, 15 Mar 2012 15:51:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/5/_/styles/combined.css?spaceKey=DIRxSBOX&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/DIRxSBOX/TxnLogManager+architecture">TxnLogManager
architecture</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~elecharny">Emmanuel
L├ęcharny</a>
    </h4>
        <br/>
                         <h4>Changes (0)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>This class is used to log the transactions in a file. We store LogEdit instances.
Here is the hierarchy for LogEdit :</p>


<p><span class="image-wrap" style=""><img src="/confluence/download/attachments/27841171/LogEdit.png?version=1&amp;modificationDate=1331826367000"
style="border: 1px solid black" /></span></p>


<p>When an operation is executed (a modification, we don't log anything for searches),
we will store two or three records :</p>
<ul class="alternate" type="square">
	<li>a TXN_BEGIN record, to mark the beginning of a transaction</li>
	<li>an optional DataChangeContainer, which will contain all the modified index and
entries</li>
	<li>a TXN_COMMIT or TXN_ABORT, depending on the success or failure of the operation.</li>
</ul>


<p>Those elements will be serialized into a UserLogRecord, following these structures
(the UserLogRecord will contains either a TxnStateChange or a DataChangeContainer) :</p>


<p><span class="image-wrap" style=""><img src="/confluence/download/attachments/27841171/UserLogRecord.png?version=1&amp;modificationDate=1331826367000"
style="border: 1px solid black" /></span></p>

<p>All those structure will be serialized using the minimal size, so we use Externizable
classes and we use readExternal() and writeExternal() directly, to save some bytes and time
(this serialization is done in a locked section).</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/DIRxSBOX/TxnLogManager+architecture">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=27841171&revisedVersion=2&originalVersion=1">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message