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

        ingenthr Matt Ingenthron created issue -
        ingenthr Matt Ingenthron made changes -
        Field Original Value New Value
        Project Couchbase Java Client [ 10080 ] Spymemcached Java Client [ 10047 ]
        Key JCBC-101 SPY-97
        Affects Version/s 2.8.2 [ 10348 ]
        Affects Version/s 1.1dp2 [ 10347 ]
        Fix Version/s 1.1beta [ 10370 ]
        ingenthr Matt Ingenthron made changes -
        Assignee Raghavan Srinivas [ rags ] Michael Nitschinger [ daschl ]
        daschl Michael Nitschinger made changes -
        Fix Version/s .next [ 10205 ]
        daschl Michael Nitschinger made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]

          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