GetDocument() always returns Expiry of 0 for the document

CouchbaseBucket GetDocument() returns the IDocumentResult object which contains a CouchbaseDocument.Document object. The uint Expiry property is always zero and not what is actually set in couchbase.

Here is a quick sample code which should show the problem.

var response = Bucket.Upsert(storageLocation, buffer, TimeSpan.FromDays(30));

var downloadedCBFile = CouchbaseIndexContent.Bucket.GetDocument<byte[]>(storageLocation);
Assert.IsTrue(downloadedCBFile.Document.Expiry > 0);

Hi @Phase

Couchbase’s GET operation (either directly or using the document interface) unfortunately does not return a document’s expiry. It is possible to use subdoc to retrieve a full document body along with additional metadata, but this seems to be missing in the .NET SDK. I’ve raised ticket NCBC-2067 to track getting that added.