Dgraph version : v1.2.0
Dgraph SHA-256 : ff6a20cdd76a03a37f916b039b82bf0120b1d8ffb89edba90cecbac0652cc207
Commit SHA-1 : 24b4b7439
Commit timestamp : 2020-01-27 15:53:31 -0800
Branch : HEAD
Go version : go1.13.5
What is the hardware spec (RAM, OS)?
MacOS Catlina version 10.15.2
Memory: 8 GB 1600 MHz DDR3
Steps to reproduce the issue (command/config used to run Dgraph).
curl -sSf https://get.dgraph.io | bash
$ /usr/local/bin/dgraph alpha
[Decoder]: Using assembly version of decoder
2020/02/06 02:04:39 LRU memory (--lru_mb) must be at least 1024 MB. Currently set to: -1.000000
For more information on --lru_mb please read https://docs.dgraph.io/deploy/#config
Expected behaviour and actual result.
Expected to bring up the Alpha server by setting LRU memory to 25% of the total memory as it is done in Linux.
Something curious is happening. I don’t use Docker natively on my macOS. However, I am not able to reproduce this problem using binaries or a VM. The user (@zhouqiang-cl) reports that it happened to him using Docker with k8s enabled.
I tested using binaries locally, changing Shells. And all tests I managed to run without needing the flag. Apparently this problem was not supposed to be happening. Perhaps it is something related to permission. The docker instance may not have permissions to request values on the OS or machine.
Maybe, Dgraph should have a default value when it is unable to infer the values it needs (such as RAM size).
JFYI - I ran into this on GKE, Master version 1.16, Container-Optimized OS, using the dgraph-single.yaml quickstart. Manfested as crashloop for alpha container.
It looks like the flag is now --cache size-mb=1024 (in v21.03.0, at least). Btw, I think this would be worth adding to the CHANGELOG.md, assuming what I typed is correct.