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

CASMutator expiration doesn't work properly.


    • 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:
    • Environment:


      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.


        mikew Mike Wiederhold created issue -
        mikew Mike Wiederhold made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]


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


            • Created:

              Gerrit Reviews

              There are no open Gerrit changes