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

decode and test for unlock cases of NOT_FOUND, NOT_MY_VBUCKET and ETMPFAIL

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.8.2
    • Fix Version/s: .next
    • Component/s: None
    • Security Level: Public
    • Labels:
      None

      Description

      Current unlock implementation does not read the response and do anything with it. It simply says okay for any received responses.

      Tests and implementation should check for the various responses expected. This should be documented somewhere and implementation should follow the documentation, but just to show what the current server implementation is I plucked this out of the server code for ep_engine:

      ENGINE_ERROR_CODE rv = e->unlockKey(key, vbucket, cas, ep_current_time());

      if (rv == ENGINE_SUCCESS)

      { *msg = "UNLOCKED"; }

      else if (rv == ENGINE_TMPFAIL)

      { *msg = "UNLOCK_ERROR"; res = PROTOCOL_BINARY_RESPONSE_ETMPFAIL; }

      else {
      if (e->isDegradedMode())

      { *msg = "LOCK_TMP_ERROR"; return PROTOCOL_BINARY_RESPONSE_ETMPFAIL; }

      RCPtr<VBucket> vb = e->getVBucket(vbucket);
      if (!vb)

      { *msg = "That's not my bucket."; res = PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET; }

      *msg = "NOT_FOUND";
      res = PROTOCOL_BINARY_RESPONSE_KEY_ENOENT;
      }

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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            daschl Michael Nitschinger
            Reporter:
            ingenthr Matt Ingenthron
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Gerrit Reviews

              There are no open Gerrit changes