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 149F1200D19 for ; Fri, 6 Oct 2017 15:48:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1300D1609DF; Fri, 6 Oct 2017 13:48:53 +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 AEB5A1609D0 for ; Fri, 6 Oct 2017 15:48:51 +0200 (CEST) Received: (qmail 64776 invoked by uid 500); 6 Oct 2017 13:48:50 -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 64766 invoked by uid 99); 6 Oct 2017 13:48:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2017 13:48:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D4A9ECFFB9 for ; Fri, 6 Oct 2017 13:48:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.4 X-Spam-Level: X-Spam-Status: No, score=-0.4 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id tuz3m4x3MFzE for ; Fri, 6 Oct 2017 13:48:47 +0000 (UTC) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 033C261125 for ; Fri, 6 Oct 2017 13:48:46 +0000 (UTC) Received: by mail-io0-f173.google.com with SMTP id 101so3857482ioj.3 for ; Fri, 06 Oct 2017 06:48:46 -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=gO+kyVKYfrZdkQX0/BJxjKNNiakVgGCH+xvJMVXBUsY=; b=hY+j8DQDxmgqSB+aARJhO2KKh0zg4jLP9I32GRytSuxMCpOGAqde4XHawISlB5BApi Xj2apxDdNS/dYk1BMtE5TZ+JSjLVrMtasBKLR0/3wuIfMfihBYgXai99VkjONo/1kz1u y4cHHrlMlWiBZRhmfJZXnvpwMXBvVrWQovwa96uz7uV1pUkqrsUkI74PmpE58S0OYWFB HHmc9RqyNJD7481+nZiXyK42QoFKrhDYIBid2xtpf1e6djkkt7IC4FQYpuTRUSF1fhor qV4GhW08YGESGFlH2DRy3fRkBQ+l/oaX/IRz++CO9UkSlbjDg7mAPCguFWK3yOzfTl5s P0GQ== 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=gO+kyVKYfrZdkQX0/BJxjKNNiakVgGCH+xvJMVXBUsY=; b=ssUVdD9kV+22wsNa6N/6dS68FoEBSkTftrQnB+nX/CHS3Kr+NOOtzeucW6XZw/2DBU /52aa/1kNGPy2O2G9FBEzvjxfnH3sExjw4jQAhOSZgOSU6HXlvy3vW0w4v5/lyNm4wSs n+NrCvfktYCjQ+5DwaSM9CEhbBARuhzsC8yMtw9BdYJDrEwT0NNYMH/gBMyoDYpfqAOx WsNNIqIHnitrnqtjX42RvErlKhK0gjL+ErLMhNhKrWhqSf+ndFZ7D3grxo8zbfBaDbf3 8qp7jcq6/aLxu03eqEPQfhBaYY9+n0ASdzH1c6saic5Otne5awFIaLoCQXnSk6zF0l/1 ZeTw== X-Gm-Message-State: AMCzsaUgMs9TJC1V2qvO1OtzEA/13VhVI2oaF1MLFFb1wpMIUOBw6BnE +7k572Xltq4BJgTvGZpsaAA94pgFnmqDnOg477w= X-Google-Smtp-Source: AOwi7QAAB7xzDtWtJeC2uDUREyNMfnlutAbVng56cTnlLrVoOrnphjdpwPuxiA1uPBE9vsOra3WYJVPjPSYVC0c+cRA= X-Received: by 10.107.11.139 with SMTP id 11mr2442381iol.271.1507297725973; Fri, 06 Oct 2017 06:48:45 -0700 (PDT) MIME-Version: 1.0 References: <1507282775619-0.post@n6.nabble.com> In-Reply-To: <1507282775619-0.post@n6.nabble.com> From: Denis Mekhanikov Date: Fri, 06 Oct 2017 13:48:35 +0000 Message-ID: Subject: Re: Race in Service Grid deployment? To: user@ignite.apache.org Content-Type: multipart/alternative; boundary="001a113fc3ca870c46055ae11990" archived-at: Fri, 06 Oct 2017 13:48:53 -0000 --001a113fc3ca870c46055ae11990 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Artem! This is a known issue. I created a JIRA ticket for it: https://issues.apache.org/jira/browse/IGNITE-6571 The exception that you see in log doesn't mean anything bad, it just means that you are trying to call a method of a service that is already deployed, but haven't initialized yet. After the appearance of this error in log, operation finishes successfully and returns a correct value, so you don't need to worry about it. Denis =D0=BF=D1=82, 6 =D0=BE=D0=BA=D1=82. 2017 =D0=B3. =D0=B2 12:39, Art=D1=91m B= asov : > So we found this one while testing nodes shutdown and startup under light > but > steady load. > > Setup: > > We have 2 types of nodes let's call them Vehicle node (VehicleService > deployed there) and client node. > Client node have constant load applied to Vehicle grid (could be many > nodes. > We will stick with 1 since it reproducible even there) via following code= : > > public static void main(String[] args) throws IgniteException, > InterruptedException { > Ignite ignite =3D Ignition.start("config/client-node-config.xml")= ; > VehicleService vehicleService =3D > ignite.services().serviceProxy(VehicleService.SERVICE_NAME, > VehicleService.class, false); > > int cnt =3D 0; > while(!Thread.currentThread().isInterrupted()) { > String answer =3D null; > try { > answer =3D "" + vehicleService.testService(); > } catch (Exception e) { > answer =3D e.getMessage(); > } > System.out.println("#"+ cnt++ + "a=3D" + answer); > TimeUnit.MILLISECONDS.sleep(10); > } > } > > From the VehicleService side testService() is dead simple: > > @Override > public int testService() { > return 1; > } > > And i added some delay in init() of VehicleService: > public void init(ServiceContext ctx) throws Exception { > System.out.println("Initializing Vehicle Service on node:" + > ignite.cluster().localNode() + " within 10 seconds"); > > SECONDS.sleep(10); > } > > Steps: > > 1) Start Vehicle service node > Observation: VehicleService deployed > > 2) Start main() provided above > Observation: output, as expected will be printing counter+ 1 as result of > service execution - OK > > 3) Stop VehicleService node > Observation: output of main() : > [12:06:06] Topology snapshot [ver=3D7, servers=3D1, clients=3D0, CPUs=3D4= , > heap=3D3.5GB] > #286a=3DNode has left grid: 34c87a31-12b5-4e9f-a172-3f881d12d949 > [12:06:06,040][SEVERE][pub-#53%null%][GridTaskWorker] Failed to obtain > remote job result policy for result from ComputeTask.result(..) method > (will > fail the whole task): GridJobResultImpl [job=3DC2V2 > > [c=3Do.a.i.i.processors.service.GridServiceProcessor$ServiceTopologyCalla= ble@3f672204 > ], > sib=3DGridJobSiblingImpl > [sesId=3D520eee0fe51-710996c1-c154-4fca-af30-0a067ec16009, > jobId=3D620eee0fe51-710996c1-c154-4fca-af30-0a067ec16009, > nodeId=3D34c87a31-12b5-4e9f-a172-3f881d12d949, isJobDone=3Dfalse], > jobCtx=3DGridJobContextImpl > [jobId=3D620eee0fe51-710996c1-c154-4fca-af30-0a067ec16009, timeoutObj=3Dn= ull, > attrs=3D{}], node=3DTcpDiscoveryNode [id=3D34c87a31-12b5-4e9f-a172-3f881d= 12d949, > addrs=3D[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.6.251], > sockAddrs=3D[/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, > BASOV/192.168.6.251:47500], discPort=3D47500, order=3D4, intOrder=3D3, > lastExchangeTime=3D1507280749135, loc=3Dfalse, > ver=3D1.9.0#20170302-sha1:a8169d0a, > isClient=3Dfalse], ex=3Dclass o.a.i.cluster.ClusterTopologyException: Nod= e has > left grid: 34c87a31-12b5-4e9f-a172-3f881d12d949, hasRes=3Dtrue, > isCancelled=3Dfalse, isOccupied=3Dtrue] > class org.apache.ignite.cluster.ClusterTopologyException: Node has left > grid: 34c87a31-12b5-4e9f-a172-3f881d12d949 > at > > org.apache.ignite.internal.processors.task.GridTaskWorker.onNodeLeft(Grid= TaskWorker.java:1460) > at > > org.apache.ignite.internal.processors.task.GridTaskProcessor$TaskDiscover= yListener$1.run(GridTaskProcessor.java:1248) > at > > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.= java:6674) > at > > org.apache.ignite.internal.processors.closure.GridClosureProcessor$1.body= (GridClosureProcessor.java:783) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110= ) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java= :1142) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav= a:617) > at java.lang.Thread.run(Thread.java:748) > #287a=3DFailed to find deployed service: VehicleService > #288a=3DFailed to find deployed service: VehicleService > which is expected behavior. > > 4) Start VehicleService node. VehicleService deployed > Observation: suddenly, output contains: > Initializing Vehicle Service on node:TcpDiscoveryNode > [id=3Ddd38ff63-b3b2-486a-8974-5bebcb576cd8, addrs=3D[0:0:0:0:0:0:0:1, > 127.0.0.1, > 192.168.6.251], sockAddrs=3D[BASOV/192.168.6.251:47501, > /0:0:0:0:0:0:0:1:47501, /127.0.0.1:47501], discPort=3D47501, order=3D2, > intOrder=3D2, lastExchangeTime=3D1507280863055, loc=3Dtrue, > ver=3D1.9.0#20170302-sha1:a8169d0a, isClient=3Dfalse] within 10 seconds > [12:07:43,691][SEVERE][pub-#46%null%][GridJobWorker] Failed to execute jo= b > [jobId=3Dd7180f0fe51-0fd41e8b-385e-4480-8510-dca328846008, > ses=3DGridJobSessionImpl [ses=3DGridTaskSessionImpl > [taskName=3Do.a.i.i.processors.service.GridServiceProxy$ServiceProxyCalla= ble, > dep=3DGridDeployment [ts=3D1507280863375, depMode=3DSHARED, > clsLdr=3Dsun.misc.Launcher$AppClassLoader@18b4aac2, > clsLdrId=3D9a2b0f0fe51-dd38ff63-b3b2-486a-8974-5bebcb576cd8, userVer=3D0, > loc=3Dtrue, > > sampleClsName=3Do.a.i.i.processors.cache.distributed.dht.preloader.GridDh= tPartitionFullMap, > pendingUndeploy=3Dfalse, undeployed=3Dfalse, usage=3D1], > > taskClsName=3Do.a.i.i.processors.service.GridServiceProxy$ServiceProxyCal= lable, > sesId=3Dc7180f0fe51-0fd41e8b-385e-4480-8510-dca328846008, > startTime=3D1507280863660, endTime=3D9223372036854775807, > taskNodeId=3D0fd41e8b-385e-4480-8510-dca328846008, > clsLdr=3Dsun.misc.Launcher$AppClassLoader@18b4aac2, closed=3Dfalse, > cpSpi=3Dnull, > failSpi=3Dnull, loadSpi=3Dnull, usage=3D1, fullSup=3Dfalse, internal=3Dfa= lse, > subjId=3D0fd41e8b-385e-4480-8510-dca328846008, mapFut=3DIgniteFuture > [orig=3DGridFutureAdapter [resFlag=3D0, res=3Dnull, startTime=3D150728086= 3678, > endTime=3D0, ignoreInterrupts=3Dfalse, state=3DINIT]]], > jobId=3Dd7180f0fe51-0fd41e8b-385e-4480-8510-dca328846008]] > class org.apache.ignite.IgniteException: Service not found: VehicleServic= e > at > > org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2V2.e= xecute(GridClosureProcessor.java:2059) > at > > org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWor= ker.java:560) > at > > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.= java:6618) > at > > org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobW= orker.java:554) > at > > org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorke= r.java:483) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110= ) > at > > org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExec= uteRequest(GridJobProcessor.java:1180) > at > > org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionLi= stener.onMessage(GridJobProcessor.java:1894) > at > > org.apache.ignite.internal.managers.communication.GridIoManager.invokeLis= tener(GridIoManager.java:1222) > at > > org.apache.ignite.internal.managers.communication.GridIoManager.processRe= gularMessage0(GridIoManager.java:850) > at > > org.apache.ignite.internal.managers.communication.GridIoManager.access$21= 00(GridIoManager.java:108) > at > > org.apache.ignite.internal.managers.communication.GridIoManager$7.run(Gri= dIoManager.java:790) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java= :1142) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav= a:617) > at java.lang.Thread.run(Thread.java:748) > Caused by: class > org.apache.ignite.internal.processors.service.GridServiceNotFoundExceptio= n: > Service not found: VehicleService > at > > org.apache.ignite.internal.processors.service.GridServiceProxy$ServicePro= xyCallable.call(GridServiceProxy.java:397) > at > > org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2V2.e= xecute(GridClosureProcessor.java:2056) > ... 14 more > Executing Vehicle Service on node:TcpDiscoveryNode > [id=3Ddd38ff63-b3b2-486a-8974-5bebcb576cd8, addrs=3D[0:0:0:0:0:0:0:1, > 127.0.0.1, > 192.168.6.251], sockAddrs=3D[BASOV/192.168.6.251:47501, > /0:0:0:0:0:0:0:1:47501, /127.0.0.1:47501], discPort=3D47501, order=3D2, > intOrder=3D2, lastExchangeTime=3D1507280873066, loc=3Dtrue, > ver=3D1.9.0#20170302-sha1:a8169d0a, isClient=3Dfalse] > > > From my understanding, this means that Client node got the information > about > VehicleService deployment before VehicleService deployment node. > > Steps 1 and 3 is somewhat optional - i had reproduced this issue without > them as well. > > Question is - is this is expected behaviour (race intentionally allowed) = or > is a bug? > > Here is sample project - It is somewhat messy. Sorry about that. > MicroServicesExample-master.zip > < > http://apache-ignite-users.70518.x6.nabble.com/file/t1099/MicroServicesEx= ample-master.zip > > > It is modified example https://github.com/dmagda/MicroServicesExample. > You > only interested in VehicleServiceNodeStartup and ServiceRaceTest entry > points. > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > --001a113fc3ca870c46055ae11990 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Artem!

This is a known issue. I crea= ted a JIRA ticket for it:=C2=A0https://issues.apache.org/jira/browse/IGNITE-6571

The exception that you see in log doesn't mean an= ything bad, it just means that you are trying to call a method of a service= that is already deployed, but haven't initialized yet.
After= the appearance of this error in log, operation finishes successfully and r= eturns a correct value, so you don't need to worry about it.
=
Denis

=D0=BF=D1=82, 6 =D0=BE=D0=BA=D1=82. 2017 =D0=B3. =D0=B2 12:39, Art=D1= =91m Basov <basov.artem@gmail.c= om>:
So we found this one wh= ile testing nodes shutdown and startup under light but
steady load.

Setup:

We have 2 types of nodes let's call them Vehicle node (VehicleService deployed there) and client node.
Client node have constant load applied to Vehicle grid (could be many nodes= .
We will stick with 1 since it reproducible even there) via following code:<= br>
=C2=A0public static void main(String[] args) throws IgniteException,
InterruptedException {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Ignite ignite =3D Ignition.start("config/c= lient-node-config.xml");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 VehicleService vehicleService =3D
ignite.services().serviceProxy(VehicleService.SERVICE_NAME,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 VehicleService.clas= s, false);

=C2=A0 =C2=A0 =C2=A0 =C2=A0 int cnt =3D 0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 while(!Thread.currentThread().isInterrupted()) = {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 String answer =3D null;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 try {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 answer =3D "&q= uot; +=C2=A0 vehicleService.testService();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } catch (Exception e) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 answer =3D e.getMes= sage();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 System.out.println("#"+= cnt++ + "a=3D" + answer);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TimeUnit.MILLISECONDS.sleep(10);<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 }

From the VehicleService side testService() is dead simple:

=C2=A0@Override
=C2=A0 =C2=A0 public int testService() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return 1;
=C2=A0 =C2=A0 }

And i added some delay in init() of VehicleService:
public void init(ServiceContext ctx) throws Exception {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 System.out.println("Initializing Vehicle S= ervice on node:" +
ignite.cluster().localNode() + " within 10 seconds");

=C2=A0 =C2=A0 =C2=A0 =C2=A0 SECONDS.sleep(10);
=C2=A0 =C2=A0 }

Steps:

1) Start Vehicle service node
Observation: VehicleService deployed

2) Start main() provided above
Observation: output, as expected will be printing counter+ 1 as result of service execution - OK

3) Stop VehicleService node
Observation: output of main() :
[12:06:06] Topology snapshot [ver=3D7, servers=3D1, clients=3D0, CPUs=3D4,<= br> heap=3D3.5GB]
#286a=3DNode has left grid: 34c87a31-12b5-4e9f-a172-3f881d12d949
[12:06:06,040][SEVERE][pub-#53%null%][GridTaskWorker] Failed to obtain
remote job result policy for result from ComputeTask.result(..) method (wil= l
fail the whole task): GridJobResultImpl [job=3DC2V2
[c=3Do.a.i.i.processors.service.GridServiceProcessor$ServiceTopologyCallabl= e@3f672204],
sib=3DGridJobSiblingImpl
[sesId=3D520eee0fe51-710996c1-c154-4fca-af30-0a067ec16009,
jobId=3D620eee0fe51-710996c1-c154-4fca-af30-0a067ec16009,
nodeId=3D34c87a31-12b5-4e9f-a172-3f881d12d949, isJobDone=3Dfalse],
jobCtx=3DGridJobContextImpl
[jobId=3D620eee0fe51-710996c1-c154-4fca-af30-0a067ec16009, timeoutObj=3Dnul= l,
attrs=3D{}], node=3DTcpDiscoveryNode [id=3D34c87a31-12b5-4e9f-a172-3f881d12= d949,
addrs=3D[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.6.251],
sockAddrs=3D[/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500,
BASOV/192.168.6.251:47500], discPort=3D47500, order=3D4, intOrder=3D3,=
lastExchangeTime=3D1507280749135, loc=3Dfalse, ver=3D1.9.0#20170302-sha1:a8= 169d0a,
isClient=3Dfalse], ex=3Dclass o.a.i.cluster.ClusterTopologyException: Node = has
left grid: 34c87a31-12b5-4e9f-a172-3f881d12d949, hasRes=3Dtrue,
isCancelled=3Dfalse, isOccupied=3Dtrue]
class org.apache.ignite.cluster.ClusterTopologyException: Node has left
grid: 34c87a31-12b5-4e9f-a172-3f881d12d949
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.task.GridTaskWorker.onNodeLeft(GridTa= skWorker.java:1460)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.task.GridTaskProcessor$TaskDiscoveryL= istener$1.run(GridTaskProcessor.java:1248)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.ja= va:6674)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$1.body(G= ridClosureProcessor.java:783)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.Thread.run(Thread.java:748)
#287a=3DFailed to find deployed service: VehicleService
#288a=3DFailed to find deployed service: VehicleService
which is expected behavior.

4) Start VehicleService node. VehicleService deployed
Observation: suddenly, output contains:
Initializing Vehicle Service on node:TcpDiscoveryNode
[id=3Ddd38ff63-b3b2-486a-8974-5bebcb576cd8, addrs=3D[0:0:0:0:0:0:0:1, 127.0= .0.1,
192.168.6.251], sockAddrs=3D[BASOV/192.168.6.251:47501,
/0:0:0:0:0:0:0:1:47501, /127.0.0.1:47501], discPort=3D47501, order=3D2, intOrder=3D2, lastExchangeTime=3D1507280863055, loc=3Dtrue,
ver=3D1.9.0#20170302-sha1:a8169d0a, isClient=3Dfalse] within 10 seconds
[12:07:43,691][SEVERE][pub-#46%null%][GridJobWorker] Failed to execute job<= br> [jobId=3Dd7180f0fe51-0fd41e8b-385e-4480-8510-dca328846008,
ses=3DGridJobSessionImpl [ses=3DGridTaskSessionImpl
[taskName=3Do.a.i.i.processors.service.GridServiceProxy$ServiceProxyCallabl= e,
dep=3DGridDeployment [ts=3D1507280863375, depMode=3DSHARED,
clsLdr=3Dsun.misc.Launcher$AppClassLoader@18b4aac2,
clsLdrId=3D9a2b0f0fe51-dd38ff63-b3b2-486a-8974-5bebcb576cd8, userVer=3D0, loc=3Dtrue,
sampleClsName=3Do.a.i.i.processors.cache.distributed.dht.preloader.GridDhtP= artitionFullMap,
pendingUndeploy=3Dfalse, undeployed=3Dfalse, usage=3D1],
taskClsName=3Do.a.i.i.processors.service.GridServiceProxy$ServiceProxyCalla= ble,
sesId=3Dc7180f0fe51-0fd41e8b-385e-4480-8510-dca328846008,
startTime=3D1507280863660, endTime=3D9223372036854775807,
taskNodeId=3D0fd41e8b-385e-4480-8510-dca328846008,
clsLdr=3Dsun.misc.Launcher$AppClassLoader@18b4aac2, closed=3Dfalse, cpSpi= =3Dnull,
failSpi=3Dnull, loadSpi=3Dnull, usage=3D1, fullSup=3Dfalse, internal=3Dfals= e,
subjId=3D0fd41e8b-385e-4480-8510-dca328846008, mapFut=3DIgniteFuture
[orig=3DGridFutureAdapter [resFlag=3D0, res=3Dnull, startTime=3D15072808636= 78,
endTime=3D0, ignoreInterrupts=3Dfalse, state=3DINIT]]],
jobId=3Dd7180f0fe51-0fd41e8b-385e-4480-8510-dca328846008]]
class org.apache.ignite.IgniteException: Service not found: VehicleService<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2V2.exe= cute(GridClosureProcessor.java:2059)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorke= r.java:560)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.ja= va:6618)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWor= ker.java:554)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.= java:483)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecut= eRequest(GridJobProcessor.java:1180)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionList= ener.onMessage(GridJobProcessor.java:1894)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListe= ner(GridIoManager.java:1222)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegu= larMessage0(GridIoManager.java:850)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.managers.communication.GridIoManager.access$2100= (GridIoManager.java:108)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.managers.communication.GridIoManager$7.run(GridI= oManager.java:790)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1= 142)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 617)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.Thread.run(Thread.java:748)
Caused by: class
org.apache.ignite.internal.processors.service.GridServiceNotFoundException:=
Service not found: VehicleService
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.service.GridServiceProxy$ServiceProxy= Callable.call(GridServiceProxy.java:397)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2V2.exe= cute(GridClosureProcessor.java:2056)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ... 14 more
Executing Vehicle Service on node:TcpDiscoveryNode
[id=3Ddd38ff63-b3b2-486a-8974-5bebcb576cd8, addrs=3D[0:0:0:0:0:0:0:1, 127.0= .0.1,
192.168.6.251], sockAddrs=3D[BASOV/192.168.6.251:47501,
/0:0:0:0:0:0:0:1:47501, /127.0.0.1:47501], discPort=3D47501, order=3D2, intOrder=3D2, lastExchangeTime=3D1507280873066, loc=3Dtrue,
ver=3D1.9.0#20170302-sha1:a8169d0a, isClient=3Dfalse]


From my understanding, this means that Client node got the information abou= t
VehicleService deployment before VehicleService deployment node.

Steps 1 and 3 is somewhat optional - i had reproduced this issue without them as well.

Question is - is this is expected behaviour (race intentionally allowed) or=
is a bug?

Here is sample project - It is somewhat messy. Sorry about that.
MicroServicesExample-master.zip
<http://= apache-ignite-users.70518.x6.nabble.com/file/t1099/MicroServicesExample-mas= ter.zip>
=C2=A0It is modified example https://github.com/dmagda= /MicroServicesExample. You
only interested in VehicleServiceNodeStartup and ServiceRaceTest entry
points.




--
Sent from: http://apache-ignite-users.70518.x6.nabbl= e.com/
--001a113fc3ca870c46055ae11990--