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 32EB0200B4A for ; Wed, 20 Jul 2016 20:13:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 317C6160A64; Wed, 20 Jul 2016 18:13:28 +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 75A58160A5B for ; Wed, 20 Jul 2016 20:13:27 +0200 (CEST) Received: (qmail 18361 invoked by uid 500); 20 Jul 2016 18:13:26 -0000 Mailing-List: contact issues-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list issues@geode.incubator.apache.org Received: (qmail 18352 invoked by uid 99); 20 Jul 2016 18:13:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2016 18:13:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3FC691858DE for ; Wed, 20 Jul 2016 18:13:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id AG0TSsZlcCs4 for ; Wed, 20 Jul 2016 18:13:22 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id A572F60E20 for ; Wed, 20 Jul 2016 18:13:21 +0000 (UTC) Received: (qmail 17455 invoked by uid 99); 20 Jul 2016 18:13:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2016 18:13:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B19322C0059 for ; Wed, 20 Jul 2016 18:13:20 +0000 (UTC) Date: Wed, 20 Jul 2016 18:13:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@geode.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-1617) Regions can be created with a variety of characters that are unsupported MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 20 Jul 2016 18:13:28 -0000 [ https://issues.apache.org/jira/browse/GEODE-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15386341#comment-15386341 ] ASF GitHub Bot commented on GEODE-1617: --------------------------------------- Github user dschneider-pivotal commented on a diff in the pull request: https://github.com/apache/incubator-geode/pull/201#discussion_r71577488 --- Diff: geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java --- @@ -7769,17 +7879,55 @@ void cleanUpOnIncompleteOp(EntryEventImpl event, RegionEntry re) { this.entries.removeEntry(event.getKey(), re, false) ; } - static void validateRegionName(String name) + static void validateRegionName(String name, InternalRegionArguments internalRegionArgs) { if (name == null) { throw new IllegalArgumentException(LocalizedStrings.LocalRegion_NAME_CANNOT_BE_NULL.toLocalizedString()); } - if (name.length() == 0) { + if (name.isEmpty()) { throw new IllegalArgumentException(LocalizedStrings.LocalRegion_NAME_CANNOT_BE_EMPTY.toLocalizedString()); } - if (name.indexOf(SEPARATOR) >= 0) { + if (name.contains(SEPARATOR)) { throw new IllegalArgumentException(LocalizedStrings.LocalRegion_NAME_CANNOT_CONTAIN_THE_SEPARATOR_0.toLocalizedString(SEPARATOR)); } + + // Validate the name of the region only if it isn't an internal region + if (internalRegionArgs.isInternalRegion()){ + return; + } + if (internalRegionArgs.isUsedForMetaRegion()) { + return; + } + if (internalRegionArgs.isUsedForPartitionedRegionAdmin()) { + return; + } + if (internalRegionArgs.isUsedForPartitionedRegionBucket()) { + return; + } + +// LocalRegion metaRegion = internalRegionArgs.getInternalMetaRegion(); +// if (metaRegion != null) { +// if (metaRegion instanceof HARegion) { +// if (metaRegion.getName().equals(name)) { +// return; +// } +// } +// if (metaRegion instanceof SerialGatewaySenderQueueMetaRegion) { +// return; +// } +// } + + if (name.startsWith("__") --- End diff -- Why was the special case needed? Shouldn't this region have set isInternalRegion? > Regions can be created with a variety of characters that are unsupported > ------------------------------------------------------------------------ > > Key: GEODE-1617 > URL: https://issues.apache.org/jira/browse/GEODE-1617 > Project: Geode > Issue Type: Bug > Components: gfsh > Affects Versions: 1.0.0-incubating.M2 > Reporter: Kevin Duling > Assignee: Kevin Duling > > Per this [thread|https://www.mail-archive.com/dev@geode.incubator.apache.org/msg04046.html], and this [thread|https://www.mail-archive.com/dev@geode.incubator.apache.org/msg07079.html] on the dev forums and [geode documentation|http://docs-geode-develop.cfapps.io/docs/basic_config/data_regions/region_naming.html], region names may only consist of alphanumeric characters, an underscore, and a hyphen. These rules are not enforced. > E.g., it is possible to create a region with: > {{gfsh> create region --name=not^good --type=REPLICATE}} > Some of these regions may be removed with the {{destroy}} command, while others cannot be located. -- This message was sent by Atlassian JIRA (v6.3.4#6332)