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 10851200D06 for ; Mon, 25 Sep 2017 21:24:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0F1D11609BB; Mon, 25 Sep 2017 19:24:56 +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 2D2231609B5 for ; Mon, 25 Sep 2017 21:24:55 +0200 (CEST) Received: (qmail 60389 invoked by uid 500); 25 Sep 2017 19:24:54 -0000 Mailing-List: contact dev-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 dev@ignite.apache.org Received: (qmail 60377 invoked by uid 99); 25 Sep 2017 19:24:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Sep 2017 19:24:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7ACD31A176D for ; Mon, 25 Sep 2017 19:24:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.801 X-Spam-Level: X-Spam-Status: No, score=-0.801 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4HQ1lZT97-Ds for ; Mon, 25 Sep 2017 19:24:49 +0000 (UTC) Received: from mail-ua0-f171.google.com (mail-ua0-f171.google.com [209.85.217.171]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4407E5F2AD for ; Mon, 25 Sep 2017 19:24:49 +0000 (UTC) Received: by mail-ua0-f171.google.com with SMTP id l94so5056496ual.11 for ; Mon, 25 Sep 2017 12:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=wSVBLha5DLj5j+lGYqvS1v+IhZaw7HJ3hMNPFdjGmzk=; b=cAtzLqsiSRt70VzXN/MijYDsSdN9TqINGyVXlblGHlgpBLTZ6UBkyClR0VC+75W73k Iv751zdCAok8cdvZVNq5AxENszTdZTEooCPKla5c/k/Pvpdm49y0k5Xebl82VDhCSDEx szcByYDyDOgOyLkzmMVslWVJoGpfghIY/kO1J2PpRns8C8Ymf4TZ+yknRxmfSbA+pJvl 8kFyiFDv5F4dbuCg9wvwVcbbxPBAW8uWeoTAfJ56MjMjiO88Pk523q4a5ma70GR2czj3 Yj7ixo2KhmrTUQekMZxJmnkUS4UOQZ35T80NYIavV8Zdi5bKHBOtEuRZAWeEq/KTKfDZ NV9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=wSVBLha5DLj5j+lGYqvS1v+IhZaw7HJ3hMNPFdjGmzk=; b=pquzYoCcq+/WEIvn6LyAD+HFeS+YNQQ5BjBBtHRzmuCTXKovyvAgou5p1ye6pmdI1A eEcmYvKJvhbb7j+6p4u3jC313d0sbWYNOOCik8c3kQ58EZtma+g6pouV/MB1Pag+cbf3 IauOXeL5Do3bIbCjfG3OlMPGHmCwG/VD3QGbWRXGCtXc88tRLV6IkWdgteryr2BFrnDA CRCLiMshHOavQFJ0Ug8BlPXqj0iUqyAFjlZURUQOqScyAkgdtNDX20OJTxVAKWRTTGBg U3Wgq0FJzKJioGFy47Z4ZoBhzVf57YcH9hGbz1p0D79G+VoDBZfPSzJq4jubI8vlI+3S EduA== X-Gm-Message-State: AHPjjUhkDeP0gn/QIrGzS2WBhdWaH37p2LCFsoxsDoOxHghODHwTFfqP cilMGDlxlov7KWrSsd4iD4oWr1ohMxrZP5O8Sykmig== X-Google-Smtp-Source: AOwi7QAj7Winpb4XVZuAC39YdTktOoOv+/kIEPxTEaGTuK9ZiMEWVunz1H4lWu2JDCJ0gW374mX8d2q1h7bxUWoRmQQ= X-Received: by 10.176.65.104 with SMTP id j95mr8123771uad.176.1506367488068; Mon, 25 Sep 2017 12:24:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.89.193 with HTTP; Mon, 25 Sep 2017 12:24:47 -0700 (PDT) In-Reply-To: References: <6b03926e-35c5-9229-d9d2-6f2f74b0e1a7@ya.ru> <2B2EE969-7B3C-4772-8F95-BDF9DCD46B39@apache.org> From: Vladimir Ozerov Date: Mon, 25 Sep 2017 22:24:47 +0300 Message-ID: Subject: Re: Persistence per memory policy configuration To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="94eb2c122f06072f55055a0883e6" archived-at: Mon, 25 Sep 2017 19:24:56 -0000 --94eb2c122f06072f55055a0883e6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dima, let's finalize the design first. As I understand, we are happy with idea to merge MemoryConfiguration and PersistentStoreConfiguration into something what I called DataConfiguration, and to rename MemoryPolicyConfiguration to DataRegionConfiguration. The only outstanding qurestion is whether DataConfiguration is a good name. I am not very happy with it, so let's think of other alternatives. Quick ideas: 1) StoreConfiguration - looks perfect to me - short and self-describing, but clashes a bit with existing CacheStore 2) DataStoreConfiguration - same as p.1, but the word "data" is not necessary IMO 3) PageStoreConfiguration? GIves a hint to our page-based architecture. 4) DurableMemoryConfiguration - aligns well with our docs, but I do not like it - too long and misleading Any other ideas? I would prefer to have either [StoreConfiguration + StoreRegionConfiguration] or [PageStoreConfiguration and PageStoreRegionConfiguration]. Looks clean and simple. Vladimir. On Mon, Sep 25, 2017 at 3:49 PM, Dmitriy Setrakyan wrote: > Vladimir, > > Can you please add the configuration example in the ticket? > > D. > > On Mon, Sep 25, 2017 at 12:20 AM, Alexey Goncharuk < > alexey.goncharuk@gmail.com> wrote: > > > Guys, > > > > I suggest we finalize the configuration changes in the original ticket > > then: https://issues.apache.org/jira/browse/IGNITE-6030 and proceed wit= h > > the changes. > > > > 2017-09-23 17:08 GMT+03:00 Dmitriy Setrakyan : > > > > > Can we specify what metrics will look like? I think we should not jus= t > > > blindly merge them. > > > > > > On Fri, Sep 22, 2017 at 11:01 PM, Vladimir Ozerov < > vozerov@gridgain.com> > > > wrote: > > > > > > > Denis, > > > > > > > > Makes sense. Thanks for catching it! > > > > > > > > On Sat, Sep 23, 2017 at 8:45 AM, Denis Magda > > wrote: > > > > > > > > > If we=E2=80=99re taking the consolidation path for Memory and Per= sistence > > > > > configurations then it makes sense to merge MemoryMetrics [1] and > > > > > PersistenceMetrics [2] plus their JMX beans. > > > > > > > > > > Agree? > > > > > > > > > > [1] https://ignite.apache.org/releases/latest/javadoc/org/ > > > > > apache/ignite/MemoryMetrics.html > > > > releases/latest/javadoc/org/apache/ignite/MemoryMetrics.html> > > > > > [2] https://ignite.apache.org/releases/latest/javadoc/org/ > > > apache/ignite/ > > > > > PersistenceMetrics.html > > > > > > > > > > =E2=80=94 > > > > > Denis > > > > > > > > > > > On Sep 22, 2017, at 10:18 PM, Dmitriy Setrakyan < > > > dsetrakyan@apache.org > > > > > > > > > > wrote: > > > > > > > > > > > > I like it. > > > > > > > > > > > > Alexey G, can you please chime in? > > > > > > > > > > > > D. > > > > > > > > > > > > On Fri, Sep 22, 2017 at 11:33 AM, Vladimir Ozerov < > > > > vozerov@gridgain.com> > > > > > > wrote: > > > > > > > > > > > >> Guys, > > > > > >> > > > > > >> Here is my proposal: > > > > > >> > > > > > >> 1) MemoryPolicyConfiguration is renamed to > > > *DataRegionConfiguration*. > > > > > >> 2) PersistenceConfiguration is merged with MemoryConfiguration > and > > > > > renamed > > > > > >> to ... *DataStorageConfiguration*! It has: common memory > settings > > > > (e.g. > > > > > >> default data region), persistence settings (e.g. WAL) and a li= st > > of > > > > > >> DataRegionConfiguration beans. > > > > > >> > > > > > >> What we have in the end: > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> value=3D"1_000_000_000" > > /> > > > > > >> > > > > > >> > > > > > >> > > > > > >> value=3D"1_000_000_000" > > /> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> Makes sense? > > > > > >> > > > > > >> Vladimir. > > > > > >> > > > > > >> > > > > > >> On Thu, Sep 21, 2017 at 7:04 AM, Dmitriy Setrakyan < > > > > > dsetrakyan@apache.org> > > > > > >> wrote: > > > > > >> > > > > > >>> Firstly all, why not call it DataPolicy instead of > MemoryPolicy? > > > > > >> Secondly, > > > > > >>> why not set data policies directly on IgniteConfiguration. An= d > > > > lastly, > > > > > >> how > > > > > >>> about we combine memory and disk properties in one bean with > > clear > > > > > naming > > > > > >>> convention? > > > > > >>> > > > > > >>> Here is the example. Note that all properties above must star= t > > with > > > > > with > > > > > >>> "Memory" or "Disk". > > > > > >>> > > > > > >>> *IgniteConfiguration cfg =3D new IgniteConfiguration();* > > > > > >>> > > > > > >>> > > > > > >>> > > > > > >>> > > > > > >>>> > > > > > >>>> > > > > > >>>> > > > > > >>>> > > > > > >>>> *cfg.setDataPolicies( new DataPolicyConfiguration() > > > > > >>>> .setName("bla"), .setMemoryMaxSize(1024), // must be > > > greater > > > > > >> than > > > > > >>> 0, > > > > > >>>> since memory always needs to be enabled. > > > .setDiskMaxSize(0), > > > > // > > > > > >> if > > > > > >>>> greater than 0, then persistence is enabled. );* > > > > > >>> > > > > > >>> > > > > > >>> > > > > > >>> I think this approach is much more concise and straight > forward. > > > What > > > > > do > > > > > >>> you think? > > > > > >>> > > > > > >>> D. > > > > > >>> > > > > > >>> On Wed, Sep 20, 2017 at 4:55 AM, Vladimir Ozerov < > > > > vozerov@gridgain.com > > > > > > > > > > > >>> wrote: > > > > > >>> > > > > > >>>> I prefer the second. Composition over inheritance - this is > how > > > all > > > > > our > > > > > >>>> configuration is crafted. > > > > > >>>> > > > > > >>>> E.g. we do not have "CacheConfiguration" and " > > > > > >>>> StoreEnabledCacheConfiguration". > > > > > >>>> Instead, we have "CacheConfiguration.setCacheStoreFactory". > > > > > >>>> > > > > > >>>> On Wed, Sep 20, 2017 at 2:46 PM, Alexey Goncharuk < > > > > > >>>> alexey.goncharuk@gmail.com> wrote: > > > > > >>>> > > > > > >>>>> Reiterating this based on some feedback from PDS users. > > > > > >>>>> > > > > > >>>>> It might be confusing to configure persistence with > > > "MemoryPolicy", > > > > > >> so > > > > > >>>>> another approach is to deprecate the old names and introduc= e > a > > > new > > > > > >> name > > > > > >>>>> "DataRegion" because it reflects the actual state when data > is > > > > stored > > > > > >>> on > > > > > >>>>> disk and partially in memory. I have two options in mind, > each > > of > > > > > >> them > > > > > >>>>> looks acceptable to me, so I would like to have some feedba= ck > > > from > > > > > >> the > > > > > >>>>> community. Old configuration names will be deprecated (but > > still > > > be > > > > > >>> taken > > > > > >>>>> if used for backward compatibility). Note, that old names > > > > deprecation > > > > > >>>>> handles default configuration compatibility very nicely - > > current > > > > PDS > > > > > >>>> users > > > > > >>>>> will not need to change anything to keep everything working= . > > The > > > > two > > > > > >>>>> options I mentioned are below: > > > > > >>>>> > > > > > >>>>> * we have two separate classes for in-memory and persisted > data > > > > > >>> regions, > > > > > >>>>> so the configuration would look like so: > > > > > >>>>> > > > > > >>>>> IgniteConfiguration cfg =3D new IgniteConfiguration(); > > > > > >>>>> > > > > > >>>>> cfg.setDataRegionsConfiguration(new > DataRegionsConfiguration() > > > > > >>>>> .setDataRegions( > > > > > >>>>> new MemoryDataRegion() > > > > > >>>>> .setName("volatileCaches") > > > > > >>>>> .setMaxMemorySize(...), > > > > > >>>>> new PersistentDataRegion() > > > > > >>>>> .setName("persistentCaches") > > > > > >>>>> .setMaxMemorySize(...) > > > > > >>>>> .setMaxDiskSize())); > > > > > >>>>> > > > > > >>>>> cfg.setPersistentStoreConfiguration(new > > > > > >> PersistentStoreConfiguration() > > > > > >>> ); > > > > > >>>>> > > > > > >>>>> > > > > > >>>>> * we have one class for data region configuration, but it > will > > > > have a > > > > > >>>>> sub-bean for persistence configuration: > > > > > >>>>> > > > > > >>>>> IgniteConfiguration cfg =3D new IgniteConfiguration(); > > > > > >>>>> > > > > > >>>>> cfg.setDataRegionsConfiguration(new > DataRegionsConfiguration() > > > > > >>>>> .setDataRegions( > > > > > >>>>> new DataRegion() > > > > > >>>>> .setName("volatileCaches") > > > > > >>>>> .setMaxMemorySize(...), > > > > > >>>>> new DataRegion() > > > > > >>>>> .setName("persistentCaches") > > > > > >>>>> .setMaxMemorySize(...), > > > > > >>>>> .setPersistenceConfiguration( > > > > > >>>>> new DataRegionPersistenceConfiguration() > > > > > >>>>> .setMaxDiskSize(...)))); > > > > > >>>>> > > > > > >>>>> cfg.setPersistentStoreConfiguration(new > > > > > >> PersistentStoreConfiguration() > > > > > >>> ); > > > > > >>>>> > > > > > >>>> > > > > > >>> > > > > > >> > > > > > > > > > > > > > > > > > > > > --94eb2c122f06072f55055a0883e6--