From user-return-26845-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Tue Aug 13 06:50:27 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 083791804BB for ; Tue, 13 Aug 2019 08:50:26 +0200 (CEST) Received: (qmail 24217 invoked by uid 500); 13 Aug 2019 06:50:26 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 24207 invoked by uid 99); 13 Aug 2019 06:50:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Aug 2019 06:50:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 50311C0865 for ; Tue, 13 Aug 2019 06:50:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.801 X-Spam-Level: * X-Spam-Status: No, score=1.801 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id YIlf_T7yp86s for ; Tue, 13 Aug 2019 06:50:23 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.179; helo=mail-lj1-f179.google.com; envelope-from=marco.bernagozzi@gmail.com; receiver= Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id E8A6CBC809 for ; Tue, 13 Aug 2019 06:50:22 +0000 (UTC) Received: by mail-lj1-f179.google.com with SMTP id d24so100508874ljg.8 for ; Mon, 12 Aug 2019 23:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=2I5gA4O79rbu51yLaDntsCOhIcEz/SYOt7r7PezJAnU=; b=QCe4RJ7TYpUpyk9bAAkJmPUYCv/ThwuGceZL0r0F6BPa+8rprwv0kR7+QAkYhH3IvU X46wxhez7L71PQ+uoxHajNxYFmIZB7xjG6VzEspA6ldF0iIiS4uManvdbxGtGcKe9NcK I/lraLocJEJvKzbg8gL798pJnyvTCXGOV2AS2PtK0o8nL8qu43Ee9n3VDujSABwfaS1L OlnsOxmOp6HjKr8I/vACVhtuXd8cyPJg+DeD1UOJJ99Jd/EzlvNr58TbFyucevxc3SSa xoJ1iSHZXTwCWvw1wykxuGeoA+J9L+YyWFchjsl78yIL0ewZPrTdWfJCotfG8/rbyFiC 1qYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2I5gA4O79rbu51yLaDntsCOhIcEz/SYOt7r7PezJAnU=; b=E73pfl8sQ3nxQTMn98V8EymkXzyn0yXLQSV9nePXYeEYPCT9rUw72GDmHnJOSYIGE5 QcUs5zhxvsajF0IV/eyO33bjvmQUz8+KKS0Sg6EFLx7f7T9hHG9ezSHYiKoLmsaduLbi Phf3IRtmvOuHLllkX8izmgLvlVtXkl43/XXk/8R+FqnjglwQiYtqefNSe6TbxPYCg9ww Og6ambVt+8rWlLQ7dH6ulw2iJEPqA4nMxM5P+K5hZnnJRmA9+06FD0QHzK/3EzW7DsBn WZSUQNH+0ZOxQ4qt9KonbeQZ0M17Wny8Jml8WjWFo4HxVUyOY9maZGAHw9dDa72DWPXQ MEfA== X-Gm-Message-State: APjAAAVAXBfCPukVL2Dvsb0co8f+B4fiUuCWqUNLSE5T+QJEM7lOf4p4 hIYrhdp0hC/VhfmIaF85IHPhl33+tzPnszDx5pHFk2uA8ws= X-Google-Smtp-Source: APXvYqzaYmRkVAwU56fzR29VpmOKcPoN292Tum46uK78J+tfBn1yoHjMrK7quDP+pdeD1lEa4pePyWjKEm++0j1/5Tg= X-Received: by 2002:a2e:9209:: with SMTP id k9mr20424159ljg.96.1565679021199; Mon, 12 Aug 2019 23:50:21 -0700 (PDT) MIME-Version: 1.0 References: <50ac80a7-2558-5a45-52b7-f0d3cd3cfdf7@gmail.com> In-Reply-To: <50ac80a7-2558-5a45-52b7-f0d3cd3cfdf7@gmail.com> From: Marco Bernagozzi Date: Tue, 13 Aug 2019 08:50:10 +0200 Message-ID: Subject: Re: Cache spreading to new nodes To: user@ignite.apache.org Content-Type: multipart/alternative; boundary="000000000000e430e5058ffa0d49" --000000000000e430e5058ffa0d49 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I did some more digging and discovered that the issue seems to be: org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridD= htPartitionsExchangeFuture: Completed partition exchange Is there any way to disable or limit the partition exchange? Best, Marco On Mon, 12 Aug 2019 at 16:59, Andrei Aleksandrov wrote: > Hi, > > Could you share the whole reproducer with all configurations and required > methods? > > BR, > Andrei > 8/12/2019 4:48 PM, Marco Bernagozzi =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > I have a set of nodes, and I want to be able to set a cache in specific > nodes. It works, but whenever I turn on a new node the cache is > automatically spread to that node, which then causes errors like: > Failed over job to a new node ( I guess that there was a computation goin= g > on in a node that shouldn't have computed that, and was shut down in the > meantime). > > I don't know if I'm doing something wrong here or I'm missing something. > As I understand it, NodeFilter and Affinity are equivalent in my case > (Affinity is a node filter which also creates rules on where can the cach= e > spread from a given node?). With rebalance mode set to NONE, shouldn't th= e > cache be spread on the "nodesForOptimization" nodes, according to either > the node filter or the affinityFunction? > > Here's my code: > > List nodesForOptimization =3D fetchNodes(); > > CacheConfiguration graphCfg =3D new > CacheConfiguration<>(graphCacheName); > graphCfg =3D graphCfg.setCacheMode(CacheMode.REPLICATED) > .setBackups(nodesForOptimization.size() - 1) > .setAtomicityMode(CacheAtomicityMode.ATOMIC) > .setRebalanceMode(CacheRebalanceMode.NONE) > .setStoreKeepBinary(true) > .setCopyOnRead(false) > .setOnheapCacheEnabled(false) > .setNodeFilter(u -> nodesForOptimization.contains(u.id())) > .setAffinity( > new RendezvousAffinityFunction( > 1024, > (c1, c2) -> nodesForOptimization.contains(c1.id()) && > nodesForOptimization.contains(c2.id()) > ) > ) > > .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); > > --000000000000e430e5058ffa0d49 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, I did some more digging = and discovered that the issue seems to be:=C2=A0

org.apach= e.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartiti= onsExchangeFuture: Completed partition exchange=C2=A0

Is t= here any way to disable or limit the partition exchange?=C2=A0

Best,=C2=A0
Marco=C2=A0

On Mon, 12 Aug 2019 at 16:59, Andrei Aleksand= rov <aealexsandrov@gmail.com<= /a>> wrote:
=20 =20 =20

Hi,

Could you share the whole reproducer with all configurations and required methods?

BR,
Andrei

8/12/2019 4:= 48 PM, Marco Bernagozzi =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
=20
I have a set of nodes, and I want to be able to set a cache in specific nodes. It works, but whenever I turn on a new node the cache is automatically spread to that node, which then causes errors like:
Failed over job to a new node ( I guess that there was a computation going on in a node that shouldn't have computed that, and was shut down in the meantime).

I don't know if I'm doing something wrong here or I'm m= issing something.
As I understand it, NodeFilter and Affinity are equivalent in my case (Affinity is a node filter which also creates rules on where can the cache spread from a given node?). With rebalance mode set to NONE, shouldn't the cache be spread on the "nodesForOptimization" nodes, according to either the nod= e filter or the affinityFunction?

Here's my code:

List<UUID> nodesForOptimization =3D fetchNodes();

CacheConfiguration<String, Graph> graphCfg =3D new CacheConfiguration<>(graphCacheName);
graphCfg =3D graphCfg.setCacheMode(CacheMode.REPLICATED)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setBackups(nodesForOptim= ization.size() - 1)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setAtomicityMode(CacheAt= omicityMode.ATOMIC)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setRebalanceMode(CacheRe= balanceMode.NONE)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setStoreKeepBinary(true)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setCopyOnRead(false) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setOnheapCacheEnabled(fa= lse)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setNodeFilter(u -> nodesForOptimization.contains(
u.id()))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setAffinity(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 new Rendezv= ousAffinityFunction(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 1024,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (c1, c2) -> nodesForOptimization.contains(c1.id()) && nodesForOptimization.contains(c2.id())
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYN= C);
--000000000000e430e5058ffa0d49--