InsertAsync fails because GetCidName was incomplete and it timed out

    var buck = await j.BucketAsync("plane");
    var ja = await buck.PingAsync();
    var scop = await buck.ScopeAsync("test");
    var coll = scop.Collection("plane");
    var c = coll.Cid;
    await coll.InsertAsync<dynamic>("my-document-key" , new { test = "ha"});

Everything works until the last line. coll.Cid is null, if that matters.

This is selfhosted. Let me know if you need any more information.

It sounds like the scope or collection doesn’t exist. InsertAsync will retry until it does exist - or until it times-out.

1 Like

Goodness, what an opaque way of representing that.

This was the fix, thanks!

1 Like

I’m not keen on it either. But there is no way for the SDK to know why the collection doesn’t exist. It could be that it was created and not yet propagated to that node.

The underlying cause should be in the ‘reasons’ of the timeout.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.