Get call doesn't return lastest db data

47 Views Asked by At

I am using Spanner db for my operations with golang. I do a post call which is successful and after 201 status I do a get call call to fetch data. On that call I don't get newly created data. I was able to get that data after ~5-6 sec. At the same time when i check on DB, that record was available immediately. I am not sure what is causing this issue.

DB conf.:

2 read-write replicas in us-central1 (Iowa) - default leader region 2 read-write replicas in us-central2 (Oklahoma) - private GCP region 2 read-only replicas in europe-west1 (Belgium) 2 read-only replicas in asia-east1 (Taiwan) 1 witness replica in us-east1 (South Carolina)

processing units: 100

go code to get data

dbClient.Single().
    WithTimestampBound(spanner.StrongRead()).
    Query(ctx, stmt)
0

There are 0 best solutions below