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?

v20.03.3

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
github.com/dgraph-io/dgraph/x.Fatalf
	/ext-go/1/src/github.com/dgraph-io/dgraph/x/error.go:114
github.com/dgraph-io/dgraph/worker.setBadgerOptions
	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/server_state.go:93
github.com/dgraph-io/dgraph/worker.(*ServerState).initStorage
	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/server_state.go:126
github.com/dgraph-io/dgraph/worker.InitServerState
	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/server_state.go:57
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.run
	/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/run.go:612
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.init.2.func1
	/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/run.go:90
github.com/spf13/cobra.(*Command).execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
	/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:70
main.main
	/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/main.go:78
runtime.main
	/usr/local/go/src/runtime/proc.go:203
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1373