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

CASMutator expiration doesn't work properly.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.8.0
    • 2.7.3
    • library
    • Security Level: Public
    • None
    • 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.

      Attachments

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

        Activity

          People

            mikew Mike Wiederhold [X] (Inactive)
            mikew Mike Wiederhold [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty