Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-25427

Move getMeta in to memcached

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Done
    • Major
    • 5.5.0
    • 5.0.0
    • memcached

    Description

      getMeta is implemented in ep-engine under process_unknown_command. We should be able to get enough information from bucket_get_item_info to do this in memcached for both deafult and ep-engine.

      Context

      getMeta is a command which was originally specific to ep_engine - no other engine implemented it. As such, memcached front-end didn't know about this command. It was implemented by using the unknown_command interface in engine.h - the raw packet was passed to ep_engine, which was decoded, operation executed, and then response encoded by ep_engine itself and a simple status code returned to memcached.

      As part of MB-25422, it was necessary for us to implement getMeta additionally for default engine (aka memcache bucket type). This was done by essentially duplicating the code from ep-engine into default engine - see the linked commit for MB-25422. At the time we did this because we needed a quick way to fetch metadata for tests, to verify a Spock bug.

      Task

      We don't want to have code duplicated between ep_engine and default_engine; and moreover where possible we want to have memcached be responsible for packet decoding, verification, so the engines themselves don't need to concern themselves with request / response encoding. We therefore want to move the common aspects of these functions - the packet decode, verification, and response encoding - into memcached, and have the engines just implement the actual fetching of the metadata.

      Attachments

        Issue Links

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

          Activity

            People

              paolo.cocchi Paolo Cocchi
              oliver.downard Oliver Downard (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty