Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 29536 invoked from network); 12 Jul 2007 08:57:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jul 2007 08:57:26 -0000 Received: (qmail 48423 invoked by uid 500); 12 Jul 2007 08:57:28 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 48382 invoked by uid 500); 12 Jul 2007 08:57:28 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 48367 invoked by uid 99); 12 Jul 2007 08:57:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2007 01:57:28 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2007 01:57:24 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A67F6714204 for ; Thu, 12 Jul 2007 01:57:04 -0700 (PDT) Message-ID: <22679011.1184230624677.JavaMail.jira@brutus> Date: Thu, 12 Jul 2007 01:57:04 -0700 (PDT) From: =?utf-8?Q?J=C3=B8rgen_L=C3=B8land_=28JIRA=29?= To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2926) Replication: Add a log buffer for log records that should be shipped to the slave In-Reply-To: <27751116.1184228044443.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2926?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512012 ]=20 J=C3=B8rgen L=C3=B8land commented on DERBY-2926: -------------------------------------- Note the questions below... PLAN: I am planing to write the buffer as a linked list of ReplicationLogRecord o= bjects, each containing the same information that is passed to LogToFile.ap= pendLogRecord: byte[] data int offset int length byte[] optionaldata int optionalDataOffset int optionalDataLength This is the same information that is sent in DERBY-2872 using RMI calls. Lo= g records will be appended to the buffer somewhere in the LogFactory, while= a log shipping service will remove log records from it. Adding and removin= g log records from the buffer is not part of this jira. QUESTIONS: * It will be very easy to recycle the ReplicationLogRecord objects that mak= e up the linked list. Once the log-information in an object has been shippe= d to the slave, the object could be put in a pool of recycled objects. This= would significantly reduce the number of ReplicationLogRecord objects that= must be created and garbage collected, but may increase the memory usage s= ince the objects in the pool are not removed from memory. *Is recycling con= sidered good or bad practice?* * Will it be ok to create a new directory for this, e.g. java/engine/org/ap= ache/derby/impl/store/replication/buffer/ ? It is likely that more replicat= ion functionality will be added to store later, and /store/replication coul= d then be used for all of this. > Replication: Add a log buffer for log records that should be shipped to t= he slave > -------------------------------------------------------------------------= -------- > > Key: DERBY-2926 > URL: https://issues.apache.org/jira/browse/DERBY-2926 > Project: Derby > Issue Type: Sub-task > Components: Store > Affects Versions: 10.4.0.0 > Reporter: J=C3=B8rgen L=C3=B8land > Assignee: J=C3=B8rgen L=C3=B8land > > When a Derby instance has the master role for a database, log records are= shipped to the slave to keep it up to date. A buffer is needed because the= log records should not be shipped one at a time. Also, writing the log rec= ords to a buffer instead of sending them immediately removes the network co= mmunication from the critical path for the transaction. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.