directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Directory SandBox > TxnLogManager architecture
Date Thu, 15 Mar 2012 15:51:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/2042/9/5/_/styles/combined.css?spaceKey=DIRxSBOX&amp;forWysiwyg=true"
<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="">TxnLogManager
    <h4>Page <b>edited</b> by             <a href="">Emmanuel
                         <h4>Changes (0)</h4>
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
    </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
	<li>a TXN_COMMIT or TXN_ABORT, depending on the success or failure of the operation.</li>

<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 id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
        <a href="">View
        <a href="">View

View raw message