Search code examples
ttlgemfiregeodegfsh

gfsh create command region-time-to-live not working as expected


When I create a region using the following command and use describe afterwards, it doesn't show me region-time-to-live settings at all. Only when I use alter I can see the entry-time-to-live and region-time-to-live to be set properly.

gfsh>create region --name=myRegion --type=REPLICATE --enable-statistics=true --entry-time-to-live-expiration=200 --region-time-to-live-expiration=2000

gfsh>describe region --name
Region | entry-time-to-live.timeout | 2000
       | data-policy                | REPLICATE
       | size                       | 0
       | statistics-enabled         | true
       | scope                      | distributed-ack


gfsh>alter region --name=myRegion --entry-time-to-live-expiration=200 --region-time-to-live-expiration=2000

gfsh>describe region --name
Region | entry-time-to-live.timeout | 200
       | data-policy                | REPLICATE
       | region-time-to-live.timeout| 2000
       | size                       | 0
       | statistics-enabled         | true
       | scope                      | distributed-ack

Solution

  • I believe this bug was already solved in the latest develop branch from GEODE, specifically through GEODE-1897. Below is the output I see:

        _________________________     __
       / _____/ ______/ ______/ /____/ /
      / /  __/ /___  /_____  / _____  / 
     / /__/ / ____/  _____/ / /    / /  
    /______/_/      /______/_/    /_/    1.5.0-SNAPSHOT
    
    Monitor and Manage Apache Geode
    gfsh>start locator --name=locator1
    
    gfsh>start server --name=server1
    
    gfsh>create region --name=myRegion --type=REPLICATE --enable-statistics=true --entry-time-to-live-expiration=200 --region-time-to-live-expiration=2000
    Member  | Status
    ------- | ---------------------------------------
    server1 | Region "/myRegion" created on "server1"
    
    gfsh>describe region --name=/myRegion
    ..........................................................
    Name            : myRegion
    Data Policy     : replicate
    Hosting Members : server1
    
    Non-Default Attributes Shared By Hosting Members  
    
     Type  |            Name             | Value
    ------ | --------------------------- | ---------------
    Region | entry-time-to-live.timeout  | 200
           | data-policy                 | REPLICATE
           | region-time-to-live.timeout | 2000
           | size                        | 0
           | scope                       | distributed-ack
           | statistics-enabled          | true
    

    Hope this helps. Cheers.