You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Wes Williams (JIRA)" <ji...@apache.org> on 2017/11/03 15:15:00 UTC

[jira] [Updated] (GEODE-3949) gfsh> put fails immediately after server startup

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

Wes Williams updated GEODE-3949:
--------------------------------
    Affects Version/s: 1.3.0
             Priority: Major  (was: Trivial)
          Description: 
A bug was introduced since GemFire 8.2 where regions are not available immediately after server startup. 
*GIVEN* a server that just started with a region that is defined in cache.xml, 
*THEN* following "put"  fails when run from a linux bash script:

gfsh <<!

start locator --name=locator --properties-file=config/locator.properties --port=10334 --J=-Xms256m --J=-Xmx256m

start server --name=server1 --locators=localhost[10334] --J=-Xms512m --J=-Xmx512m --cache-xml-file=config/cache.xml --properties-file=config/gemfire.properties

put --key='1' --value='A' --region=departments;  *{color:red}<==  FAIL {color}*
Result      : false
Message     : Region <departments> not found in any of the members

gfsh>list regions;
List of regions
---------------
departments

exit;
!

However, inserting a 1-second pause after server startup, the put succeeds:

{{gfsh <<!

start locator --name=locator --properties-file=config/locator.properties --port=$LOCATOR_PORT --J=-Xms256m --J=-Xmx256m

configure pdx --portable-auto-serializable-classes=".*"

start server --name=server1 --locators=localhost[10334] --J=-Xms512m --J=-Xmx512m --cache-xml-file=config/cache.xml --properties-file=config/gemfire.properties 

exit;
!

sleep 1

gfsh <<!

connect

put --key='1' --value='A' --region=departments;

}}


  was:
A bug was introduced since GemFire 8.2 that cause
Given a region "departments" that exists, an Department domain class and the domain jar deployed into the server:

gfsh>list regions;
List of regions
---------------
departments

a gfsh> put executing inside of a script yields the erroneous message about the region not existing:

2. Executing - put --key='20' --value=('deptno':'20','name':'RESEARCH') --value-class=io.pivotal.app.domain.Department --region=departments

Result      : false
Message     : Region <departments> not found in any of the members
Key Class   : java.lang.String
Key         : 20
Value Class : io.pivotal.app.domain.Department

deptno | name
------ | --------
20     | RESEARCH

Yet outside the script and entering it straight into gfsh. Note that the error message is different:

gfsh>put --key='20' --value=('deptno':'20','name':'RESEARCH') --value-class=io.pivotal.app.domain.Department --region=departments
Message : Couldn't convert JSON to Object of type class io.pivotal.app.domain.Department
Result  : false



              Summary: gfsh> put fails immediately after server startup  (was: gfsh> put returns wrong error message when cannot convert JSON to Object)

> gfsh> put fails immediately after server startup
> ------------------------------------------------
>
>                 Key: GEODE-3949
>                 URL: https://issues.apache.org/jira/browse/GEODE-3949
>             Project: Geode
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3.0
>            Reporter: Wes Williams
>            Priority: Major
>             Fix For: 1.4.0
>
>
> A bug was introduced since GemFire 8.2 where regions are not available immediately after server startup. 
> *GIVEN* a server that just started with a region that is defined in cache.xml, 
> *THEN* following "put"  fails when run from a linux bash script:
> gfsh <<!
> start locator --name=locator --properties-file=config/locator.properties --port=10334 --J=-Xms256m --J=-Xmx256m
> start server --name=server1 --locators=localhost[10334] --J=-Xms512m --J=-Xmx512m --cache-xml-file=config/cache.xml --properties-file=config/gemfire.properties
> put --key='1' --value='A' --region=departments;  *{color:red}<==  FAIL {color}*
> Result      : false
> Message     : Region <departments> not found in any of the members
> gfsh>list regions;
> List of regions
> ---------------
> departments
> exit;
> !
> However, inserting a 1-second pause after server startup, the put succeeds:
> {{gfsh <<!
> start locator --name=locator --properties-file=config/locator.properties --port=$LOCATOR_PORT --J=-Xms256m --J=-Xmx256m
> configure pdx --portable-auto-serializable-classes=".*"
> start server --name=server1 --locators=localhost[10334] --J=-Xms512m --J=-Xmx512m --cache-xml-file=config/cache.xml --properties-file=config/gemfire.properties 
> exit;
> !
> sleep 1
> gfsh <<!
> connect
> put --key='1' --value='A' --region=departments;
> }}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)