Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 08A6F200BD5 for ; Thu, 8 Dec 2016 17:58:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 070E3160B1F; Thu, 8 Dec 2016 16:58:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4F7DD160B0A for ; Thu, 8 Dec 2016 17:57:59 +0100 (CET) Received: (qmail 99115 invoked by uid 500); 8 Dec 2016 16:57:58 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 99104 invoked by uid 99); 8 Dec 2016 16:57:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2016 16:57:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 52B092C0057 for ; Thu, 8 Dec 2016 16:57:58 +0000 (UTC) Date: Thu, 8 Dec 2016 16:57:58 +0000 (UTC) From: "Alexey Goncharuk (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-4337) Introduce persistence interface to allow build reliable persistence plugins MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 08 Dec 2016 16:58:00 -0000 [ https://issues.apache.org/jira/browse/IGNITE-4337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15732726#comment-15732726 ] Alexey Goncharuk commented on IGNITE-4337: ------------------------------------------ I would rather name it {{IgniteWriteAheadLog}} then. > Introduce persistence interface to allow build reliable persistence plugins > --------------------------------------------------------------------------- > > Key: IGNITE-4337 > URL: https://issues.apache.org/jira/browse/IGNITE-4337 > Project: Ignite > Issue Type: Sub-task > Components: general > Reporter: Alexey Goncharuk > Fix For: 2.0 > > > With page memory interface introduced, it may be possible to build a persistence layer around this architecture. I think we should move the PageMemory interface itself to {{org.apache.ignite.plugin.storage}} package and introduce the following interface to allow other components to log it's activity in crash-resistant way: > {code} > /** > * > */ > public interface IgniteWriteAheadLogManager extends GridCacheSharedManager { > /** > * @return {@code true} If we have to always write full pages. > */ > public boolean isAlwaysWriteFullPages(); > /** > * @return {@code true} if WAL will perform fair syncs on fsync call. > */ > public boolean isFullSync(); > /** > * Resumes logging after start. When WAL manager is started, it will skip logging any updates until this > * method is called to avoid logging changes induced by the state restore procedure. > */ > public void resumeLogging(WALPointer lastWrittenPtr) throws IgniteCheckedException; > /** > * Appends the given log entry to the write-ahead log. > * > * @param entry entry to log. > * @return WALPointer that may be passed to {@link #fsync(WALPointer)} method to make sure the record is > * written to the log. > * @throws IgniteCheckedException If failed to construct log entry. > * @throws StorageException If IO error occurred while writing log entry. > */ > public WALPointer log(WALRecord entry) throws IgniteCheckedException, StorageException; > /** > * Makes sure that all log entries written to the log up until the specified pointer are actually persisted to > * the underlying storage. > * > * @param ptr Optional pointer to sync. If {@code null}, will sync up to the latest record. > * @throws IgniteCheckedException If > * @throws StorageException > */ > public void fsync(WALPointer ptr) throws IgniteCheckedException, StorageException; > /** > * Invoke this method to iterate over the written log entries. > * > * @param start Optional WAL pointer from which to start iteration. > * @return Records iterator. > * @throws IgniteException If failed to start iteration. > * @throws StorageException If IO error occurred while reading WAL entries. > */ > public WALIterator replay(WALPointer start) throws IgniteCheckedException, StorageException; > /** > * Gives a hint to WAL manager to clear entries logged before the given pointer. Some entries before the > * the given pointer will be kept because there is a configurable WAL history size. Those entries may be used > * for partial partition rebalancing. > * > * @param ptr Pointer for which it is safe to clear the log. > * @return Number of deleted WAL segments. > */ > public int truncate(WALPointer ptr); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)