From issues-return-52861-archive-asf-public=cust-asf.ponee.io@geode.apache.org Fri Aug 30 13:34:06 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 03550180663 for ; Fri, 30 Aug 2019 15:34:05 +0200 (CEST) Received: (qmail 28678 invoked by uid 500); 30 Aug 2019 13:34:03 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 28612 invoked by uid 99); 30 Aug 2019 13:34:03 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2019 13:34:03 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D54DEE30FC for ; Fri, 30 Aug 2019 13:34:02 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id DC6F17822C3 for ; Fri, 30 Aug 2019 13:34:00 +0000 (UTC) Date: Fri, 30 Aug 2019 13:34:00 +0000 (UTC) From: "ASF subversion and git services (Jira)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-7106) NumberFormatException for input string "MAX_PARTITIONED_REGION_ID" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GEODE-7106?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1691= 9548#comment-16919548 ]=20 ASF subversion and git services commented on GEODE-7106: -------------------------------------------------------- Commit 81a116328f1383e54d9a310063021cb12668ee8d in geode's branch refs/head= s/develop from Juan Jos=C3=A9 Ramos [ https://gitbox.apache.org/repos/asf?p=3Dgeode.git;h=3D81a1163 ] GEODE-7106: Prevent NFE During PRid Generation (#3958) - Added tests. - Fixed minor warnings. - While releasing the distributed lock acquired to generate a new global partitioned region ID, don't parse the String MAX_PARTITIONED_REGION_ID as an Integer. > NumberFormatException for input string "MAX_PARTITIONED_REGION_ID" > ------------------------------------------------------------------ > > Key: GEODE-7106 > URL: https://issues.apache.org/jira/browse/GEODE-7106 > Project: Geode > Issue Type: Bug > Components: regions > Reporter: Juan Jos=C3=A9 Ramos Cassella > Assignee: Juan Jos=C3=A9 Ramos Cassella > Priority: Major > Labels: GeodeCommons > Time Spent: 1h > Remaining Estimate: 0h > > Whenever an {{Exception}} is thrown while trying to release the distribut= ed lock used to register a partitioned region, we log a warning message wit= h the original exception, the problem is that we wrongly execute {{Integer.= valueOf(PartitionedRegionHelper.MAX_PARTITIONED_REGION_ID)}} and {{Partitio= nedRegionHelper.MAX_PARTITIONED_REGION_ID}} is of type {{String}}, resultin= g in the {{NumberFormatException}} > {code:title=3DPartitionedRegion.java|borderStyle=3Dsolid} > private static void releasePRIDLock(final DistributedLockService lockServ= ice) { > try { > lockService.unlock(PartitionedRegionHelper.MAX_PARTITIONED_REGION_I= D); > if (logger.isDebugEnabled()) { > logger.debug("releasePRIDLock: Released the dlock in allPartition= edRegions for {}", > PartitionedRegionHelper.MAX_PARTITIONED_REGION_ID); > } > } catch (Exception es) { > logger.warn(String.format("releasePRIDLock: unlocking %s caught an = exception", > Integer.valueOf(PartitionedRegionHelper.MAX_PARTITIONED_REGION_= ID)), > es); > } > } > {code} > {code:title=3DPartitionedRegionHelper.java|borderStyle=3Dsolid} > static final String MAX_PARTITIONED_REGION_ID =3D "MAX_PARTITIONED_REGION= _ID"; > {code} > The actual stack trace: > {noformat} > [warn 2019/08/20 22:06:27.520 PDT tid= =3D0x1a] Initialization failed for Region /PR_4 > org.apache.geode.internal.cache.PartitionedRegionException: An exception = was caught while registering PartitionedRegion /PR_4. dumpPRId: prIdToPR Ma= p@134033921: > , caused by java.lang.NumberFormatException: For input string: "MAX_PARTI= TIONED_REGION_ID" > =09at org.apache.geode.internal.cache.PartitionedRegion.registerPartition= edRegion(PartitionedRegion.java:1472) > =09at org.apache.geode.internal.cache.PartitionedRegion.initPRInternals(P= artitionedRegion.java:1009) > =09at org.apache.geode.internal.cache.PartitionedRegion.initialize(Partit= ionedRegion.java:1177) > =09at org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(Gem= FireCacheImpl.java:3053) > =09at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(= GemFireCacheImpl.java:2941) > =09at org.apache.geode.internal.cache.GemFireCacheImpl.createRegion(GemFi= reCacheImpl.java:2928) > =09at hydra.RegionHelper.createRegion(RegionHelper.java:106) > =09at hydra.RegionHelper.createRegion(RegionHelper.java:76) > =09at hydra.RegionHelper.createRegion(RegionHelper.java:65) > =09at diskRecovery.StartupShutdownTest.createRegions(StartupShutdownTest.= java:156) > =09at diskRecovery.StartupShutdownTest.HydraTask_initializeProxy(StartupS= hutdownTest.java:295) > =09at diskRecovery.StartupShutdownTest.HydraTask_initializeProxyDuringShu= tDownAll(StartupShutdownTest.java:318) > =09at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nat= ive Method) > =09at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Nati= veMethodAccessorImpl.java:62) > =09at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(= DelegatingMethodAccessorImpl.java:43) > =09at java.base/java.lang.reflect.Method.invoke(Method.java:566) > =09at hydra.MethExecutor.execute(MethExecutor.java:173) > =09at hydra.MethExecutor.execute(MethExecutor.java:141) > =09at hydra.TestTask.execute(TestTask.java:197) > =09at hydra.RemoteTestModule$1.run(RemoteTestModule.java:213) > Caused by: java.lang.NumberFormatException: For input string: "MAX_PARTIT= IONED_REGION_ID" > =09at java.base/java.lang.NumberFormatException.forInputString(NumberForm= atException.java:65) > =09at java.base/java.lang.Integer.parseInt(Integer.java:652) > =09at java.base/java.lang.Integer.valueOf(Integer.java:983) > =09at org.apache.geode.internal.cache.PartitionedRegion.releasePRIDLock(P= artitionedRegion.java:4960) > =09at org.apache.geode.internal.cache.PartitionedRegion._generatePRId(Par= titionedRegion.java:5010) > =09at org.apache.geode.internal.cache.PartitionedRegion.generatePRId(Part= itionedRegion.java:4970) > =09at org.apache.geode.internal.cache.PartitionedRegion.registerPartition= edRegion(PartitionedRegion.java:1383) > =09... 19 more > {noformat} -- This message was sent by Atlassian Jira (v8.3.2#803003)