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 85E96200B67 for ; Tue, 16 Aug 2016 11:54:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8474B160ABC; Tue, 16 Aug 2016 09:54:21 +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 766B1160A76 for ; Tue, 16 Aug 2016 11:54:20 +0200 (CEST) Received: (qmail 54414 invoked by uid 500); 16 Aug 2016 09:54:19 -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 54404 invoked by uid 99); 16 Aug 2016 09:54:19 -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; Tue, 16 Aug 2016 09:54:19 +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 25C5C1A0162 for ; Tue, 16 Aug 2016 09:54:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.199 X-Spam-Level: * X-Spam-Status: No, score=1.199 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, HTML_OBFUSCATE_05_10=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=llnw.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 Xjqm29eGtgVB for ; Tue, 16 Aug 2016 09:54:13 +0000 (UTC) Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 3C1AA5F2F0 for ; Tue, 16 Aug 2016 09:54:12 +0000 (UTC) Received: by mail-oi0-f48.google.com with SMTP id c15so92308494oig.0 for ; Tue, 16 Aug 2016 02:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=llnw.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=zsk3E/foRtQOem89FrzkO346P4YyKllt1pCZ0H3H3JI=; b=O7Ti//51Up7fyuO433jkbF0QGd5NKMghncqsqmFqBLiFrlwTa+oF1wbKBcwXiNqXp9 eOP3oAaJ7QGTEOn7moqlo4J9MgiklXTL+YC4IPhvcYMPBV59zqrhL//GXjDw5V74T+ki M86cNPax+T29Q7JjtoIdotGjCPzArtmlfDqmA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zsk3E/foRtQOem89FrzkO346P4YyKllt1pCZ0H3H3JI=; b=DNn8ixL7Cikwhf2dQ5m+G7IQMlUUxNhBLwHe7oRKiq4/J0KPgMThDqAEJi8/uK6pkB w3/SMRW0gDyqF4xyD6VX1DWylgLuhW5vKpFUsF4AodCq0fuaiL0sTQxjHs71qLQCTSs6 Vi3L6ze9+H4ZXTZF3j1Yp8BJQbvobu+KFw8kx5kXwh2h8JPJpuDDkj18pY8QPxlQCMKv a//RoGCQeAK/EJR+WrgoWKzVuFa0fskMLeO7GI/teF3uo2Gp7k99HGTHKr55wmPtPoxs VRNmk7+7gjt9vr5JBX+EfwI6MgfTatAxvbGuwYw7COUlhv1kIb4mZ4mJNCRyyIICKzof pRVA== X-Gm-Message-State: AEkoousycuJSRz2zIvTATz1G8y/p/VoFuojGgCaFMkZPWcWw4bxNWa7l2VEtRZ7NK+kZxCI2+LgK7ahtxWdoQMQ7m615WeEP6rY62dOH5JcNlGxGMxxCWuVFeqbSQCEzn7LwVHSQzCTJS7k+AO4= X-Received: by 10.157.35.49 with SMTP id j46mr8848834otb.38.1471341250710; Tue, 16 Aug 2016 02:54:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.47.130 with HTTP; Tue, 16 Aug 2016 02:54:10 -0700 (PDT) From: Sergii Tyshlek Date: Tue, 16 Aug 2016 12:54:10 +0300 Message-ID: Subject: Rebalance is skipped To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=001a113db64e97ad0d053a2d5458 archived-at: Tue, 16 Aug 2016 09:54:21 -0000 --001a113db64e97ad0d053a2d5458 Content-Type: text/plain; charset=UTF-8 Hello there! Some time ago we started moving from old GridGain to current Apache Ignite (1.6, now 1.7). Here are some cache config properties we use: -------------------------------------------- cacheMode=PARTITIONED atomicityMode=ATOMIC atomicWriteOrderMode=PRIMARY writeSynchronizationMode=PRIMARY_SYNC rebalanceMode=ASYNC rebalanceBatchesPrefetchCount=2 rebalanceDelay=30000 rebalanceTimeout=10000 backups=1 affinity=FairAffinityFunction affinity.partitions=1024 -------------------------------------------- At first, everything looked OK, but then I noticed that our data is not distributed evenly between nodes (despite the fact we use FairAffinityFunction, coordinator node hoards most of the cache entries). Later I discovered (through wrapping my custom class around FairAffinityFunction) that it works as expected, but the rebalancing is not. Short after starting 6 nodes (after the last one joins the topology), such debug logs appear: --------------------------------------------------------- 2016-08-15 07:36:43,070 DEBUG [exchange-worker-#318%EQGrid%] [preloader.GridDhtPreloader] - Skipping partition assignment (state is not MOVING): GridDhtLocalPartition [id=0, map=org.apache.ignite.internal.processors.cache.GridCacheCon currentMapImpl@5c35248d, rmvQueue=GridCircularBuffer [sizeMask=255, idxGen=0], cntr=0, state=OWNING, reservations=0, empty=true, createTime=08/15/2016 07:36:33] ... // repeats total of 1024 times, where id=0..1023, one for every partition // then it's followed by 2016-08-15 07:36:43,177 DEBUG [exchange-worker-#318%EQGrid%] [preloader.GridDhtPartitionDemander] - Adding partition assignments: GridDhtPreloaderAssignments [topVer=AffinityTopologyVersion [topVer=6, minorTopVer=0], cancelled=false, exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=6, minorTopVer=0], nodeId=383991fb, evt=NODE_JOINED], super={}] 2016-08-15 07:36:43,177 DEBUG [exchange-worker-#318%EQGrid%] [preloader.GridDhtPartitionDemander] - Rebalancing is not required [cache=p_queryResults, topology=AffinityTopologyVersion [topVer=6, minorTopVer=0]] 2016-08-15 07:36:43,178 DEBUG [exchange-worker-#318%EQGrid%] [preloader.GridDhtPartitionDemander] - Completed rebalance future: RebalanceFuture [sndStoppedEvnt=false, topVer=AffinityTopologyVersion [topVer=6, minorTopVer=0], updateSeq=6] 2016-08-15 07:36:43,179 INFO [exchange-worker-#318%EQGrid%] [cache.GridCachePartitionExchangeManager] - Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=6, minorTopVer=0], evt=NODE_JOINED, node=383991fb-5453-4893-9040-1baa1291881a] --------------------------------------------------------- So I started digging. Using GridDhtPartitionTopology, I got partitions map, which (aggregated) looked like this: --------------------------------------------------------- Node: 38ae4165-474d-4ed4-a292-cca78b8df5c3, partitions: {MOVING=340} Node: 8ac8d327-dc59-473f-a3e1-c5861f63f0e6, partitions: {MOVING=341} Node: c7047158-9e7b-494f-bceb-3a5774853a6c, partitions: {MOVING=342} Node: c9cc1a1f-f037-43c8-8855-0f1ccb8f0ec5, partitions: {MOVING=342} Node: dce874ff-cc1e-41c8-9e82-abfb3dfa535e, partitions: {OWNING=1024} Node: de783f6d-dc48-46b8-a387-91dd3d181150, partitions: {MOVING=342} --------------------------------------------------------- Important point is that such distribution never changes, neither right after grid start, nor after few hours. Ingesting (or not ingesting) data also doesn't seem to affect this. Changing rebalanceDelay and commenting out affinityMapper also made no difference. From what I'm seeing, affinity function distributes partitions evenly (6 nodes, ~341 partitions each = 2048, i.e. 1024 partitions and a backup), but the coordinator node just never releases 1024-341=683 partitions, being an owner of every partition in a grid. Please, help me understand what might cause such behavior. I included logs and properties, which seemed relevant to the issue, but I'll provide more if needed. - regards, Sergii -- The information in this message may be confidential. It is intended solely for the addressee(s). If you are not the intended recipient, any disclosure, copying or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. --001a113db64e97ad0d053a2d5458 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello there!

Some time ago we started moving from old GridGain to cu= rrent Apache Ignite (1.6, now 1.7).

Here are some = cache config properties we use:

------------------= --------------------------
cacheMode=3DPARTITIONED
atomicityMode=3DATOMIC
atomicWriteOrderMode=3DPRIMARY
=
writeSynchronizationMode=3DPRIMARY_SYNC

= rebalanceMode=3DASYNC
rebalanceBatchesPrefetchCount=3D2
rebalanceDelay=3D30000
rebalanceTimeout=3D10000
<= br>
backups=3D1
affinity=3DFairAffinityFunction
affinity.partitions=3D1024
-----------------------------= ---------------

At first, everything look= ed OK, but then I noticed that our data is not distributed evenly between n= odes (despite the fact we use FairAffinityFunction, coordinator node hoards= most of the cache entries).
Later I discovered (through wrapping= my custom class around FairAffinityFunction) that it works as expected, bu= t the rebalancing is not.

Short after starting 6 n= odes (after the last one joins the topology), such debug logs appear:

----------------------------------------------= -----------
2016-08-15 07:36:43,070 DEBUG [exchange-worker-#3= 18%EQGrid%] [preloader.GridDhtPreloader] - <p_queryResults> Skipping = partition assignment (state is not MOVING): GridDhtLocalPartition [id=3D0, = map=3Dorg.apache.ignite.internal.processors.cache.GridCacheConcur= rentMapImpl@5c35248d, rmvQueue=3DGridCircularBuffer [sizeMask=3D255, idxGen= =3D0], cntr=3D0, state=3DOWNING, reservations=3D0, empty=3Dtrue, createTime= =3D08/15/2016 07:36:33]
...
// repeats total of 102= 4 times, where id=3D0..1023, one for every partition
// then it&#= 39;s followed by
2016-08-15 07:36:43,177 DEBUG [exchange-wor= ker-#318%EQGrid%] [preloader.GridDhtPartitionDemander] - <p_queryRe= sults> Adding partition assignments: GridDhtPreloaderAssignments [topVer= =3DAffinityTopologyVersion [topVer=3D6, minorTopVer=3D0], cancelled=3D= false, exchId=3DGridDhtPartitionExchangeId [topVer=3DAffinityTopologyV= ersion [topVer=3D6, minorTopVer=3D0], nodeId=3D383991fb, evt=3DNODE_JO= INED], super=3D{}]
2016-08-15 07:36:43,177 DEBUG [exchange-worker= -#318%EQGrid%] [preloader.GridDhtPartitionDemander] - <p_queryResul= ts> Rebalancing is not required [cache=3Dp_queryResults, topology=3DAffi= nityTopologyVersion [topVer=3D6, minorTopVer=3D0]]
2016-08-1= 5 07:36:43,178 DEBUG [exchange-worker-#318%EQGrid%] [preloader.GridDhtParti= tionDemander] - <p_queryResults> Completed rebalance future: Reb= alanceFuture [sndStoppedEvnt=3Dfalse, topVer=3DAffinityTopologyVersion [top= Ver=3D6, minorTopVer=3D0], updateSeq=3D6]
2016-08-15 07:36:43,179= INFO [exchange-worker-#318%EQGrid%] [cache.GridCachePartitionExchange= Manager] - Skipping rebalancing (nothing scheduled) [top=3DAffinityTopology= Version [topVer=3D6, minorTopVer=3D0], evt=3DNODE_JOINED, node=3D383991fb-5= 453-4893-9040-1baa1291881a]=C2=A0
--------------------= -------------------------------------

So = I started digging. Using=C2=A0GridDhtPartitionTopology, I got partitio= ns map, which (aggregated) looked like this:
---------------------------= ------------------------------
Node: 38ae4165-474d-4ed4-a292-c= ca78b8df5c3, partitions: {MOVING=3D340}
Node: 8ac8d327-dc59-= 473f-a3e1-c5861f63f0e6, partitions: {MOVING=3D341}
Node: c70= 47158-9e7b-494f-bceb-3a5774853a6c, partitions: {MOVING=3D342}
Node: c9cc1a1f-f037-43c8-8855-0f1ccb8f0ec5, partitions: {MOVING=3D34= 2}
Node: dce874ff-cc1e-41c8-9e82-abfb3dfa535e, partitions: {= OWNING=3D1024}
Node: de783f6d-dc48-46b8-a387-91dd3d181150, p= artitions: {MOVING=3D342}
---------------------------------------------------------

Important point = is that such distribution never changes, neither right after grid start, no= r after few hours. Ingesting (or not ingesting) data also doesn't seem = to affect this. Changing rebalanceDelay and commenting out affinityMapper a= lso made no difference.
From what I'm seeing, affinity functi= on distributes partitions evenly (6 nodes, ~341 partitions each =3D 2048, i= .e. 1024 partitions and a backup), but the coordinator node just never rele= ases 1024-341=3D683 partitions, being an owner of every partition in a grid= .

Please, help me understand what might cause = such behavior. I included logs and properties, which seemed relevant to the= issue, but I'll provide more if needed.

- reg= ards, Sergii

The information in this message may be confidential. = =C2=A0It is intended solely for
the addre= ssee(s). =C2=A0If you are not the intended recipient, any disclosure,
copying or distribution of the message, or any= action or omission taken by you
in relia= nce on it, is prohibited and may be unlawful. =C2=A0Please immediately
contact the sender if you have received this = message in error.

--001a113db64e97ad0d053a2d5458--