Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-2310

HotRod Server incorrectly returns wrong metadata against getWithMetadata() when a larger value than 2147843 is set to lifespan / maxIdle

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JDG 7.3 DR4
    • JDG 7.2.3 GA
    • Server
    • None
    • JDG Sprint #21, JDG Sprint #22

      HotRod Server incorrectly returns wrong metadata for cache.getWithMetadata(key) (-1 is returned against metadata.getLifespan(), metadata.getMaxIdle(), metadata.getCreated() and metadata.getLastUsed()) when a larger value than 2147843 is set to lifespan / maxIdle.

      • example Hot Rod client code:
        // long lifespan = 2147483L; // OK
        long lifespan = 2147484L; // incorrectly treated as -1
        // long lifespan = 2147483647L; // Integer.MAX_VALUE
        long maxIdle = lifespan;
        
        System.out.printf("Execute put() new entry \"%s=%s\" with lifespan=%s, maxIdle=%s\n", key, val, lifespan, maxIdle);
        cache.put(key, val, lifespan, TimeUnit.SECONDS, maxIdle, TimeUnit.SECONDS);
        System.out.printf("New entry created : %s = %s\n", key, cache.get(key));
        
        MetadataValue metadata = cache.getWithMetadata(key);
        System.out.printf("New entry metadata: lifespan=%s, maxIlde=%s, lastUsed=%s, created=%s\n", metadata.getLifespan(), metadata.getMaxIdle(), metadata.getLastUsed(), metadata.getCreated());
        
      • example logging output
        Execute put() new entry "key=value" with lifespan=2147484, maxIdle=2147484
        New entry created : key = value
        New entry metadata: lifespan=-1, maxIlde=-1, lastUsed=-1, created=-1
        

              ttarrant@redhat.com Tristan Tarrant
              rhn-support-mmiura Masafumi Miura
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: