Hi, I am not deploying any explicit service. My Question here is if I am running 2 server nodes then both should be able to read and write to Ignite, where as in current condition only one application is able to read from ignite . Ignite jar are part of Spring application which are deployed on 2 different Machines.
Below is Piece of code which is running on one machine and not on other Lock _lock =null; try { _lock = CacheManager.getLock("DSLOCK", JourneyCacheEnum.IGNITE_DS_CACHE); _lock.lock(); ScanQuery<String, DecisionSplitWait> scanQuery = new ScanQuery<>( new IgniteBiPredicate<String, DecisionSplitWait>() { private static final long serialVersionUID = 1L; @Override public boolean apply(String e1, DecisionSplitWait e2) { Instant timeLapse = e2.getTimeLapse(); return ObjectUtils.isEmpty(timeLapse) ? true : timeLapse.isBefore(Instant.now()); } }); scanQuery.setPageSize(1); QueryCursor<Entry<String, DecisionSplitWait>> cursor = CacheManager.query(scanQuery, JourneyCacheEnum.IGNITE_DS_CACHE); Iterator<Entry<String, DecisionSplitWait>> iterator = cursor.iterator(); Entry<String, DecisionSplitWait> entry = null; if (iterator.hasNext()) { entry = iterator.next(); } if (!ObjectUtils.isEmpty(entry)) { key = entry.getKey(); decisionSplitWait = entry.getValue(); decisionSplitWait.setTimeLapse(Instant.now().plusSeconds(WAIT_TIME_ADDED_FOR_SCAN)); CacheManager.getAndReplace(key, decisionSplitWait, JourneyCacheEnum.IGNITE_DS_CACHE); } }finally { if(!ObjectUtils.isEmpty(_lock)) { _lock.unlock(); } } Regards, Gurmehar Singh From: andrei <aealexsand...@gmail.com> Sent: 25 November 2021 16:48 To: Gurmehar Kalra <gurmehar.ka...@hcl.com>; user@ignite.apache.org Subject: Re: Ignite Cluster Config Issue [CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don’t click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.] Hi, I think you have a singleton service that has been deployed to a random Ignite server node. Try checking your service configuration and make sure it contains at least the following: svcCfg.setMaxPerNodeCount(1); svcCfg.setTotalCount(3); With these properties, you will have one instance of the service across three nodes. And your service was deployed as: ig.services(ig.cluster().forServers()); Regards, Andrei 11/25/2021 2:01 PM, Gurmehar Kalra пишет: Hey, Let me explain Architecture I am running 3 Ignite server nodes ,each have some services which read and write data from Kafka and also to Ignite all services(From all servers ) are able to read from kafka and publish it to Ignite.(Ignite is in replication mode). But the thread responsible for reading from Ignite are only working on Single Node. I have added IP in Logs to identify , which packet is read from which IP . In logs it clearly shows that all services from all Nodes are able to write to Ignite , but only Single Node is reading it and publishing it ahead . Regards, Gurmehar Singh From: andrei <aealexsand...@gmail.com><mailto:aealexsand...@gmail.com> Sent: 25 November 2021 16:17 To: user@ignite.apache.org<mailto:user@ignite.apache.org> Subject: Re: Ignite Cluster Config Issue [CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don’t click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.] Hey, Sorry, but I don't understand what the issue you mentioned? You are using a transaction cache and most likely using transactions. Perhaps you are just having design problems. Tell us more about what you are going to achieve. Sincerely, Andrey 11/25/2021 11:24 AM, Gurmehar Kalra пишет: Hi, Team stuck with Issue with in Ignite Cluster where in Only Single Node is able to read data from Ignite ,other Nodes are able to write data on to Ignite , data is shared with other Nodes, Below is configuration cache.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_ASYNC); cache.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); cache.setCacheMode(CacheMode.REPLICATED); cache.setGroupName("EngineGroup"); cache.setOnheapCacheEnabled(true); LruEvictionPolicyFactory lruEvictionPolicyFactory = new LruEvictionPolicyFactory<>(10000); lruEvictionPolicyFactory.create(); cache.setEvictionPolicyFactory(lruEvictionPolicyFactory); TCP/IP Discovery Code TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(); ipFinder.setShared(true); ipFinder.setAddresses( Lists.newArrayList(IP1,IP2,IP3)); tcpDiscoverySpi.setIpFinder(ipFinder); All help appreciated . Regards, Gurmehar Singh ::DISCLAIMER:: ________________________________ The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects. ________________________________