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

transaction options timeout used for kv_timeout instead of transaction timeout (expiration_time)

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 4.1.4
    • None
    • None
    • None
    • 1
    • SDK20

    Description

      couchbase-4.1.0/src//wrapper/transactions_resource.cxx: ASSIGN_DURATION_OPTION("keyValueTimeout", config.kv_timeout, key, value);
      couchbase-4.1.0/src//wrapper/transaction_context_resource.cxx: ASSIGN_DURATION_OPTION("timeout", config.kv_timeout, key, value);

      This should not timeout in the 20 seconds, but it does.

      <?php

      // NOTE: Change the below vendor path to your own.
      // require_once '../../../vendor/autoload.php';
      require_once '/usr/local/share/pear/Couchbase/autoload.php';

      use Couchbase\ClusterOptions;
      use Couchbase\Cluster;
      use Couchbase\TransactionOptions;
      use Couchbase\TransactionAttemptContext;

      $clusterOptions = new ClusterOptions();
      $clusterOptions->credentials('Administrator', 'password');
      $cluster = new Cluster('couchbase://localhost', $clusterOptions);

      $options = new TransactionOptions();
      $options->timeout(20000);
      print strval( TransactionOptions::export($options)['timeout'] );

      $cluster->transactions()->run(
      function (TransactionAttemptContext $context)

      { sleep(16); echo 'OK'.PHP_EOL; }

      ,
      $options
      );
      ?>

      Attachments

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

        Activity

          People

            avsej Sergey Avseyev
            michael.reiche Michael Reiche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty