This repository was archived by the owner on Nov 7, 2021. It is now read-only.

Description
Copying this from Slack:
- I'd remove this line: https://github.com/linuxerwang/dgraph-bench/blob/master/main.go#L120
- I'd also ideally push many updates in one txn. So, not just one person, but say a 100 people in one txn, so each txn is doing some significant amount of work.
- When you're doing a mutate, better to give it a very generous timeout. Dgraph internally would retry the mutate. So, don't set it to 3s here: https://github.com/linuxerwang/dgraph-bench/blob/master/main.go#L103 I'd either use context.Background(), or just like 10m or so.
- If Dgraph gives you a pushback (in the error, to say server is overloaded or something), then you'd want to add some artificial delay.
- Have a look at our live loader code to see how we batch and process many updates into one txn.