[ 
https://issues.apache.org/jira/browse/GEODE-2505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Barbara Pruijn resolved GEODE-2505.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.4.0

The command already fails if the name exists. With the --skip-if-exists, the 
command will succeed and skips creating region.

 

Creating new Jira ticket to change option --skip-if-exists to --if-not-exist.

> create region command should verify region attributes
> -----------------------------------------------------
>
>                 Key: GEODE-2505
>                 URL: https://issues.apache.org/jira/browse/GEODE-2505
>             Project: Geode
>          Issue Type: Improvement
>          Components: gfsh
>            Reporter: Swapnil Bawaskar
>            Priority: Major
>             Fix For: 1.4.0
>
>
> The gfsh {{create region}} command tries to be idempotent. If I try to create 
> the same region twice I get the below message:
> {noformat}
> Member | Status
> ------ | ----------------------------------------------
> serv1  | Skipping "serv1". Region "foo" already exists.
> {noformat}
> However, when a user is using a gfsh script to configure a cluster, and 
> inadvertently changes the region attributes the {{create region}} command 
> will still succeed. 
> {noformat}
> gfsh>create region --name=foo --type=REPLICATE
> Member | Status
> ------ | --------------------------------
> serv1  | Region "/foo" created on "serv1"
> gfsh>create region --name=foo --type=PARTITION
> Member | Status
> ------ | ----------------------------------------------
> serv1  | Skipping "serv1". Region "foo" already exists.
> {noformat}
> We should verify the region attributes, and if the attributes don't match we 
> should log an error asking the user to export the data from the existing 
> region, destroy the region, create the region again with new attributes and 
> import the data.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to