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

Timestamps as expiry incorrectly handled in Insert, MutateIn and Replace options

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.1.3
    • None
    • library
    • None
    • 0
    • SDK12

    Description

      $expiry = 300;
       
      $options = new InsertOptions();
      $expiryDate = (new \DateTimeImmutable())->modify('+'.$expiry.' seconds');
      $options->expiry($expiryDate);
       
      $id = 'doc-01';
      $document = ['foo' => 'bar'];
       
      $collection->insert((string) $id, $document, $options);
      

      triggers error

      terminate called after throwing an instance of 'std::system_error'
        what():  When specifying expiry as a duration, it must not be longer than 1576800000 seconds, but got 1679609619. If you truly require a longer expiry, please specify it as an time_point instead.: invalid_argument (3)
      qemu: uncaught target signal 6 (Aborted) - core dumped
      



      Attachments

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

        Activity

          People

            avsej Sergey Avseyev
            avsej Sergey Avseyev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty