From commits-return-33824-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Thu Mar 15 15:47:23 2012 Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42D999D5C for ; Thu, 15 Mar 2012 15:47:22 +0000 (UTC) Received: (qmail 58086 invoked by uid 500); 15 Mar 2012 15:47:22 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 58012 invoked by uid 500); 15 Mar 2012 15:47:22 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 57988 invoked by uid 99); 15 Mar 2012 15:47:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 15:47:21 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 15:47:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q2FFl0ff000994 for ; Thu, 15 Mar 2012 15:47:00 GMT Date: Thu, 15 Mar 2012 11:47:00 -0400 (EDT) From: confluence@apache.org To: commits@directory.apache.org Message-ID: <2881534.50737.1331826420022.JavaMail.confluence@thor> Subject: [CONF] Apache Directory SandBox > TxnLogmanager architecture MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org

TxnLogmanager architecture

Page added by Emmanuel L=C3=A9charny


This class is used to log the transactions in a file. We store = LogEdit instances. Here is the hierarchy for LogEdit :

Unable to render embedded object: File (LogEdit.pn= g) not found.

When an operation is executed (a modification, we don't log anything for= searches), we will store two or three records :

    =09
  • a TXN_BEGIN record, to mark the beginning of a transaction
  • =09
  • an optional DataChangeContainer, which will contain all the modified= index and entries
  • =09
  • a TXN_COMMIT or TXN_ABORT, depending on the success or failure of th= e operation.

Those elements will be serialized into a UserLogRecord, following these = structures (the UserLogRecord will contains either a TxnStateChange or a Da= taChangeContainer) :

Unable to render embedded object: File (UserLogRec= ord.png) not found.

All those structure will be serialized using the minimal size, so we use= Externizable classes and we use readExternal() and writeExternal() directl= y, to save some bytes and time (this serialization is done in a locked sect= ion).