Upsert and N1QL Query Execute at the same time!

I try both “Upsert” and “Execute” at the same time. Upsert a json document and querying with n1ql query. But sometimes the result turns and sometimes does not go out. But my local computer is rarely a problem.My server version is 5.0. My local version is 6.0. Could it be that? Or is it something asynchronous?

indexes are maintained asynchronously and lags behind the bucket data.
If you need query immediately you must use one of the scan consistencies.

Thank you for your reply.

Yes I’m using Standar GSI. But I don’t know how to convert to normal index. Or i use ASP.NET C# MVC and find “ConsistentWith” method. Should I use this?

@splat1985 - Yes, use ConsistentWith, there is documentation here.


Thank you for your reply. I’m trying.

I can solve the problem. There were lines I coded differently from the documentation. I wanted to share it for information.

In settings

config.BucketConfigs = new Dictionary<string, BucketConfiguration> {
        "travel-sample", new BucketConfiguration
            UseEnhancedDurability = true

instead of

config.BucketConfigs.Add("TargetBucketName", new BucketConfiguration
                BucketName = "TargetBucketName",
                UseEnhancedDurability = true

Worked like this.

Than you very much again.

@splat1985 - looks like a bug in the bucket level configuration - I created a ticket for tracking.