Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2634

Expiry returned with entire document when ContentAs invoked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.5
    • 3.0.4
    • library
    • None
    • 1

    Description

      When document is fetched with expiration:

      var jObject = new JObject
      {
          ["TestProp"] = "SomeValue"
      };
       
      var mutResult1 = await collection.InsertAsync(id1, jObject, insertOptions => insertOptions
          .Expiry(TimeSpan.FromMilliseconds(10000)));
       
      var getResult1 = await collection.GetAsync(id1);
      var value1 = getResult1.ContentAs<JObject>();
      Console.WriteLine(value1.ToString(Formatting.Indented));
       
      Console.WriteLine("--------------------------------------------");
       
      var getResult2 = await collection.GetAsync(id1, getOptions => getOptions.Expiry());
      var value2 = getResult2.ContentAs<JObject>();
      Console.WriteLine(value2.ToString(Formatting.Indented));
      

      Output (expected):

      {
        "TestProp": "SomeValue"
      }
      

      Output (actual)

      {
        "$document": {
          "exptime": 1598520403
        },
        "": {
          "TestProp": "SomeValue"
        }
      }
      

      Attachments

        For Gerrit Dashboard: NCBC-2634
        # Subject Branch Project Status CR V

        Activity

          People

            jmorris Jeff Morris
            jmorris Jeff Morris
            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