Mutation performance issue

Trying to mutate data into dgraph and read it.

Please list the high level idea of what you want to do

We have a POSt and GET api created in golang (dgo client). There is a batch program which will invoke the POST api to create / mutate data into draph and read it using the GET. WE have used trasaction and commit as true. But seems like the data is taking a while to get reflected in dgraph and hence the GET fails.

Please list the things you have tried.

Dgraph metadata

dgraph version

Dgraph version : v20.07.2
Dgraph codename : shuri-2
Dgraph SHA-256 : a927845127dab735c24727d5a24af411168771b55236aec50f0b987e8c0ac910
Commit SHA-1 : a7bc16d56
Commit timestamp : 2020-10-22 10:17:53 -0700
Branch : HEAD
Go version : go1.14.4

Share details of your deployment and load weight. Without it there’s no way to be sure.

We have a 32GB memory unix box (aws)
There is not much data in there may be in 100s not more than that.
Its a fresh application that we ar building.

Generally, is there a consistency iissue noted? I cam across an old thread where someone had mentioned similar issue in 2019

Not enough information to say if it is this, but I believe the following would possibly show what you have been seeing:

  1. txn gets in and commits as TS=X on peer 1.
  2. query is made with best-effort=true and hits peer 2 (same group but replicated raft member).
  3. peer 2 is only caught up to TS<X, but since query is best-effort, he will not get a timestamp from the zero to ensure he has TS>=X.
  4. peer 2 serves request with TS=<X and goes about his day.

Someone can jump in and correct me if I am wrong but I believe the above is possible if you use best effort queries. Is that the case? If so, can you try without best-effort?

1 Like