geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Masaki Yamakawa (JIRA)" <>
Subject [jira] [Created] (GEODE-3809) Invalid OQL result to region with entry-idle-time setting
Date Wed, 11 Oct 2017 15:14:02 GMT
Masaki Yamakawa created GEODE-3809:

             Summary: Invalid OQL result to region with entry-idle-time setting
                 Key: GEODE-3809
             Project: Geode
          Issue Type: Bug
          Components: querying
            Reporter: Masaki Yamakawa

I am setting the expiration of entry-idle-time to Region. Despite periodic access to the region,
I discovered an event that data can not be get with OQL after the time set by entry-idle-time
has elapsed. I am using Geode in the production, so I want you to solve this problem as soon
as possible.

The cache.xml of the server is as follows:

  <cache-server port="7777" />
  <region name="Data" refid="PARTITION">
        <expiration-attributes timeout="10" action="destroy" />

The source code of the client is as follows:

private static final Integer KEY = 1;

public static void main(String[] args) throws Exception {
	Properties props = new Properties();
	props.setProperty("cache-xml-file", "clientcache.xml");
	ClientCacheFactory factory = new ClientCacheFactory(props);
	ClientCache cache = factory.create();

	Region<Integer, String> region = cache.getRegion("Data");
	region.put(KEY, "InitialValue");

	System.out.println("Get Result1=" + region.get(1));

	Pool pool = PoolManager.find("ClientPool");
	Query query = pool.getQueryService().newQuery("select k from /Data.keySet k");

	// Normal OQL result
	SelectResults result = SelectResults.class.cast(query.execute());
	System.out.println("Get Result2=" + region.get(1));
	System.out.println("Query Result2=" + result.size() + ", value=" + result.iterator().next());


	// Invalid OQL result!!!
	result = SelectResults.class.cast(query.execute());
	System.out.println("Get Result3=" + region.get(1));
	System.out.println("Query Result3=" + result.size() + ", value=" + (result.isEmpty() ? null
: result.iterator().next()));
	System.out.println("Get Result4=" + region.get(1));


  <pool name="ClientPool" subscription-enabled="true">
    <server host="localhost" port="7777" />

  <region name="Data">
    <region-attributes refid="LOCAL" pool-name="ClientPool" />

This message was sent by Atlassian JIRA

View raw message