Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-67

Preserve order of keys requested via getMulti()

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.0.4, 1.1.0-dp2
    • Component/s: library
    • Security Level: Public
    • Labels:
      None

      Description

      The php-memcached extension has nice feature to 'preserve_order' when they initialize the result object. It uses nulls in the same order as the keys, and later replaces them, because multiget responses could go in arbitrary order:
      https://github.com/php-memcached-dev/php-memcached/blob/master/php_memcached.c#L744-L746

      (thanks, avsej for finding this!)

      # Subject Project Status CR V
      For Gerrit Dashboard: &For+PCBC-67=message:PCBC-67

        Activity

        Hide
        avsej Sergey Avseyev added a comment -

        Yes, because in case of multiple nodes, libcouchbase use multiple sockets therefore responses will go out of order

        Show
        avsej Sergey Avseyev added a comment - Yes, because in case of multiple nodes, libcouchbase use multiple sockets therefore responses will go out of order
        Hide
        jan Jan Lehnardt (Inactive) added a comment -

        Sergery, good point, we should make sure we add this one to the cluster tests.

        I wonder though if you understand why ext/memcached preserves order by setting the result array keys to null. I quite don't get it

        Show
        jan Jan Lehnardt (Inactive) added a comment - Sergery, good point, we should make sure we add this one to the cluster tests. I wonder though if you understand why ext/memcached preserves order by setting the result array keys to null. I quite don't get it
        Hide
        jan Jan Lehnardt (Inactive) added a comment -
        Show
        jan Jan Lehnardt (Inactive) added a comment - A patch is for review at http://review.couchbase.org/#change,16181

          People

          • Assignee:
            jan Jan Lehnardt (Inactive)
            Reporter:
            BigBlueHat Benjamin Young
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes