Uploaded image for project: 'Spymemcached Java Client'
  1. Spymemcached Java Client
  2. SPY-69

CASMutator expiration doesn't work properly.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.3
    • Fix Version/s: 2.8.0
    • Component/s: library
    • Security Level: Public
    • Labels:
      None
    • Environment:
      All

      Description

      Team, got a customer saying that the CAS operation within spy 2.7.3 doesn't seem to reset the expiration of a key properly.

      Here's a snippet of code:

      public String updateVsSession(String key, final String session) throws Exception {

      MemcachedClient sessionClient = cachePool.getConnection(PersistableBeanType.VS_SESSION);

      Transcoder tc = new SerializingTranscoder();

      CASMutator<String> mutator = new CASMutator<String>(sessionClient, tc);

      CASMutation<String> mutation = new CASMutation<String>() {

      public String getNewValue(String current)

      { return session; }

      };

      return mutator.cas(key, session, 1900, mutation);

      }

      It appears that when running the CAS operation only once, the key expires as expected. However, if an update is made and the operation is run again, the key seems to last forever.

      Can you confirm whether this is a bug or expected? The customer expects that the CAS operation would constantly "extend" the expiration time.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

          • Assignee:
            mikew Mike Wiederhold
            Reporter:
            mikew Mike Wiederhold
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes