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

getVersion() returns memcached version, not couchbase version

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.1.0-dp5
    • Fix Version/s: 1.1.0
    • Component/s: library
    • Security Level: Public
    • Labels:
      None

      Description

      For whatever reason, when doing getVersion() on the php ext the showed version is not the couchbase one. I assume its the memcached one, but I think this will only confuse people.

      Is it possible to change this to the corresponding couchbase version?

      array(2)

      { '192.168.56.101:11210' => string(18) "1.4.4_600_g7ea975a" '192.168.56.102:11210' => string(18) "1.4.4_600_g7ea975a" }

      Michael

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

        Activity

        Hide
        trond Trond Norbye added a comment -

        This is easily achieved with something among the lines of:

        <?php
        $cb = new CouchbaseClusterManager("localhost", "Administrator", "asdasd");
        $info = json_decode($cb->getInfo());
        foreach ($info->

        {"nodes"}

        as $node) {
        print $node->

        {"hostname"}

        . " is running " . $node->

        {"version"}

        . "\n";
        }
        ?>

        Show
        trond Trond Norbye added a comment - This is easily achieved with something among the lines of: <?php $cb = new CouchbaseClusterManager("localhost", "Administrator", "asdasd"); $info = json_decode($cb->getInfo()); foreach ($info-> {"nodes"} as $node) { print $node-> {"hostname"} . " is running " . $node-> {"version"} . "\n"; } ?>
        Hide
        daschl Michael Nitschinger added a comment -

        If this is easily achievable, I'd definitely vote for it. It could be done the same way as getVersion() that returns an array for each node with the corresponding version.

        Show
        daschl Michael Nitschinger added a comment - If this is easily achievable, I'd definitely vote for it. It could be done the same way as getVersion() that returns an array for each node with the corresponding version.
        Hide
        trond Trond Norbye added a comment -

        I don't have a printout of what the REST response from the server looks like, but I think we should add a call to the library we may use to retrieve that version. I don't think we should change the current getVersion() (in case someone use that already), but rather have something like getClusterVersion (or getNodeVersion). The cluster may be running multiple versions during an upgrade scenario...

        Show
        trond Trond Norbye added a comment - I don't have a printout of what the REST response from the server looks like, but I think we should add a call to the library we may use to retrieve that version. I don't think we should change the current getVersion() (in case someone use that already), but rather have something like getClusterVersion (or getNodeVersion). The cluster may be running multiple versions during an upgrade scenario...
        Hide
        ingenthr Matt Ingenthron added a comment -

        Trond: not assigning this to you to fix it, but rather just to get your opinion on what we should do here.

        We have a getVersion() which maps to the memcached protocol version command. Given that our server returns this string, should we change the behavior of getVersion() on the client?

        My current feeling is no. Besides, this issue has never been reported by a real user. We're staying true to the interface we intended to implement, it's not our fault that the string coming back is confusing.

        What do you think?

        Show
        ingenthr Matt Ingenthron added a comment - Trond: not assigning this to you to fix it, but rather just to get your opinion on what we should do here. We have a getVersion() which maps to the memcached protocol version command. Given that our server returns this string, should we change the behavior of getVersion() on the client? My current feeling is no. Besides, this issue has never been reported by a real user. We're staying true to the interface we intended to implement, it's not our fault that the string coming back is confusing. What do you think?
        Hide
        ingenthr Matt Ingenthron added a comment -

        Unfortunately, this is a bit correct. The memcached protocol "version" command returns that string. We're simply returning what the server says. I know it's a bit confusing in this instance. I think I'd asked for this behavior, but maybe we need to reconsider it a bit.

        Show
        ingenthr Matt Ingenthron added a comment - Unfortunately, this is a bit correct. The memcached protocol "version" command returns that string. We're simply returning what the server says. I know it's a bit confusing in this instance. I think I'd asked for this behavior, but maybe we need to reconsider it a bit.

          People

          • Assignee:
            trond Trond Norbye
            Reporter:
            daschl Michael Nitschinger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes