REST requests without any headers do not expire in JDG.

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Data Grid (JDG)
    • 7.x

Issue

  • Default expiration defined in JDG server does not work when entries are added through REST
  • REST requests does not expire if headers are not provided.

Resolution

  • For now headers (maxidletimeseconds and timetoliveseconds) are required to be sent in REST request to avoid this issue as below :
curl -H "authorization: Basic XXX" -H "maxidletimeseconds: 0" -H "timetoliveseconds: 0" -H "content-type: text/plain;charset=ISO-8859-1" -X PUT --data "BAR" "http://127.0.0.1:8080/rest/testCache/FOO"
  • This is a bug in JDG and JIRA JDG-1768 is raised.

Root Cause

  • The attributes timeToLiveSeconds and maxIdleTimeSeconds headers are assigned the value 0, then cache uses the default values configured either using XML or programatically.

  • Refer REST Interface Operation Headers for more information.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments