Crash reported as Info instead of Error

Report a Dgraph Bug

When encountering a crash reported by server_state.go, got back an a log entry as an info instead of an error.

What version of Dgraph are you using?


Have you tried reproducing the issue with the latest release?

not yet

What is the hardware spec (RAM, OS)?

  • Amazon Linux (EKS cluster)

Steps to reproduce the issue (command/config used to run Dgraph).

Here’s one way to make dgraph alpha crash and reproduce this error dgragh --config config.hcl where config.hcl has the following contents:

"mutations" = "disallow"

"badger" = {
  "tables" = "mmap"
  "vlog" = "mmap"

"export" = "myexport"

Currently HCL configuration is causing crash (separate issue) but this revealed a different bug.

Expected behavior and actual result.

Crashes are typically errrors? These are marked as Info:

I0721 05:23:34.622289      19 server_state.go:75] Setting Badger Compression Level: 0
I0721 05:23:34.622348      19 server_state.go:84] Setting Badger table load option: 
2020/07/21 05:23:34 Invalid Badger Tables options
	/go/pkg/mod/[email protected]/command.go:830*Command).ExecuteC
	/go/pkg/mod/[email protected]/command.go:914*Command).Execute
	/go/pkg/mod/[email protected]/command.go:864

We fixed the logging part. The issue was we are using the x.Fatal which is not setting up the severity levels of logs. Here is the PR fix(dgraph): correcting crash log level by aman-bansal · Pull Request #6585 · dgraph-io/dgraph · GitHub

1 Like