Won't Fix
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Jeffry Morris
Jeffry MorrisReporter
Arun Vijayraghavan
Arun Vijayraghavan(Deactivated)Labels
Story Points
1
Sprint
None
Fix versions
Affects versions
Priority
Instabug
Open Instabug
PagerDuty
PagerDuty
Sentry
Sentry
Zendesk Support
Zendesk Support
Created November 11, 2021 at 11:16 PM
Updated June 3, 2022 at 8:21 PM
Resolved June 3, 2022 at 8:21 PM
class Program { static async Task Main(string[] args) { try { var cluster = await Couchbase.Cluster.ConnectAsync("couchbase://localhost", "Administrator", "password"); var bucket = await cluster.BucketAsync("travel-sample"); var scope = await bucket.ScopeAsync("inventory"); var coll = await scope.CollectionAsync("airport"); var key = "airport-500001"; var document = new { id=500001, type = "airport", airportname = "Francis Airport", Country = "France" }; await coll.UpsertAsync<dynamic>(key, document); await coll.GetAndLockAsync(key, TimeSpan.FromSeconds(30)); await coll.RemoveAsync(key); } catch (CouchbaseException ex) { Console.WriteLine(ex); } catch (Exception ex) { Console.WriteLine(ex); } Console.Read(); } }
In the code above, attempt to remove a document thats being locked should raise a DocumentLockedException instead a AmbiguousTimeoutException is raised
Couchbase.Core.Exceptions.AmbiguousTimeoutException: The operation /25 timed out after 00:00:02.5000000. It was retried 10 times using Couchbase.Core.Retry.BestEffortRetryStrategy. at Couchbase.Utils.ThrowHelper.ThrowTimeoutException(IOperation operation, IErrorContext context) at Couchbase.Core.Retry.RetryOrchestrator.RetryAsync(BucketBase bucket, IOperation operation, CancellationTokenPair tokenPair) at Couchbase.KeyValue.CouchbaseCollection.RemoveAsync(String id, RemoveOptions options) at ScopeLevelQuery.Program.Main(String[] args) in /Users/arun.vijayraghavan/ScopeLevelQuery/ScopeLevelQuery/Program.cs:line 47