Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(zero): improve error message while unmarshalling WAL #8882

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

shivaji-kharse
Copy link
Contributor

Added stack trace to the error message
This was the error message before change


github.com/dgraph-io/dgraph/x.Check
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/x/error.go:42
github.com/dgraph-io/dgraph/dgraph/cmd/zero.run
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/dgraph/cmd/zero/run.go:338
github.com/dgraph-io/dgraph/dgraph/cmd/zero.init.0.func1
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/dgraph/cmd/zero/run.go:83
github.com/spf13/cobra.(*Command).execute
	/home/ash/go/pkg/mod/github.com/spf13/[email protected]/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
	/home/ash/go/pkg/mod/github.com/spf13/[email protected]/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/home/ash/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/dgraph/cmd/root.go:78
main.main
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/dgraph/main.go:99
runtime.main
	/usr/local/go/src/runtime/proc.go:225
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1371

This is the error message after change

2023/06/23 11:37:32 proto: ZeroProposal: wiretype end group for non-group
error unmarshlling wal entry: [645646546234234364565565434545234343566456456463452422daee13212313123123131313131312316c686f73743a37303830200130cf94d1a40612380a18302d6467726170682e6772617068716c2e705f7175657279121c08011218302d6467726170682e6772617068716c2e705f717565727912300a14302d6467726170682e6772617068716c2e786964121808011214302d6467726170682e6772617068716c2e78696412360a17302d6467726170682e6772617068716c2e736368656d61121b08011217302d6467726170682e6772617068716c2e736368656d6112280a10302d6467726170682e64726f702e6f70121408011210302d6467726170682e64726f702e6f7012220a0d302d6467726170682e7479706512110801120d302d6467726170682e7479706512120a05302d616765120908011205302d616765121c0a0a302d66756c6c4e616d65120e0801120a302d66756c6c4e616d6512160a07302d656d61696c120b08011207302d656d61696c180b20b1bfa6fbf6e9d6f30c1a1f0801121b0901000000000000001a0e6c6f63616c686f73743a35303830200120904e28b0ea013001422466346266353138302d303964302d346136632d383537612d3731653030623138626536664a1310ffffffffffffffffff0118b098efa5062001]
github.com/dgraph-io/dgraph/dgraph/cmd/zero.(*node).checkForCIDInEntries
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/raft.go:632
github.com/dgraph-io/dgraph/dgraph/cmd/zero.(*node).initAndStartNode
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/raft.go:665
github.com/dgraph-io/dgraph/dgraph/cmd/zero.run
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/run.go:337
github.com/dgraph-io/dgraph/dgraph/cmd/zero.init.0.func1
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/run.go:82
github.com/spf13/cobra.(*Command).execute
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/root.go:77
main.main
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/main.go:98
runtime.main
	/home/shiva/go/src/runtime/proc.go:250
runtime.goexit
	/home/shiva/go/src/runtime/asm_amd64.s:1594

github.com/dgraph-io/dgraph/x.Check
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/x/error.go:42
github.com/dgraph-io/dgraph/dgraph/cmd/zero.run
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/run.go:337
github.com/dgraph-io/dgraph/dgraph/cmd/zero.init.0.func1
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/run.go:82
github.com/spf13/cobra.(*Command).execute
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/root.go:77
main.main
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/main.go:98
runtime.main
	/home/shiva/go/src/runtime/proc.go:250
runtime.goexit
	/home/shiva/go/src/runtime/asm_amd64.s:1594

@dgraph-bot dgraph-bot added the go Pull requests that update Go code label Jun 23, 2023
@mangalaman93 mangalaman93 changed the title chore(zero): improve error message while unmarshlling WAL chore(zero): improve error message while unmarshalling WAL Jun 23, 2023
@shivaji-kharse shivaji-kharse merged commit bad5a09 into main Jun 23, 2023
@shivaji-kharse shivaji-kharse deleted the shiva/curr branch June 23, 2023 10:54
dgraph-bot pushed a commit that referenced this pull request Jul 7, 2023
Added stack trace to the error message 
This was the error message before change
```2023/05/09 20:31:21 proto: Tablet: illegal tag 0 (wire type 0)

github.com/dgraph-io/dgraph/x.Check
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/x/error.go:42
github.com/dgraph-io/dgraph/dgraph/cmd/zero.run
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/dgraph/cmd/zero/run.go:338
github.com/dgraph-io/dgraph/dgraph/cmd/zero.init.0.func1
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/dgraph/cmd/zero/run.go:83
github.com/spf13/cobra.(*Command).execute
	/home/ash/go/pkg/mod/github.com/spf13/[email protected]/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
	/home/ash/go/pkg/mod/github.com/spf13/[email protected]/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/home/ash/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/dgraph/cmd/root.go:78
main.main
	/home/ash/go/src/github.com/dgraph-io/dgraph-release/dgraph/main.go:99
runtime.main
	/usr/local/go/src/runtime/proc.go:225
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1371
```

This is the error message after change

```
2023/06/23 11:37:32 proto: ZeroProposal: wiretype end group for non-group
error unmarshlling wal entry: [645646546234234364565565434545234343566456456463452422daee13212313123123131313131312316c686f73743a37303830200130cf94d1a40612380a18302d6467726170682e6772617068716c2e705f7175657279121c08011218302d6467726170682e6772617068716c2e705f717565727912300a14302d6467726170682e6772617068716c2e786964121808011214302d6467726170682e6772617068716c2e78696412360a17302d6467726170682e6772617068716c2e736368656d61121b08011217302d6467726170682e6772617068716c2e736368656d6112280a10302d6467726170682e64726f702e6f70121408011210302d6467726170682e64726f702e6f7012220a0d302d6467726170682e7479706512110801120d302d6467726170682e7479706512120a05302d616765120908011205302d616765121c0a0a302d66756c6c4e616d65120e0801120a302d66756c6c4e616d6512160a07302d656d61696c120b08011207302d656d61696c180b20b1bfa6fbf6e9d6f30c1a1f0801121b0901000000000000001a0e6c6f63616c686f73743a35303830200120904e28b0ea013001422466346266353138302d303964302d346136632d383537612d3731653030623138626536664a1310ffffffffffffffffff0118b098efa5062001]
github.com/dgraph-io/dgraph/dgraph/cmd/zero.(*node).checkForCIDInEntries
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/raft.go:632
github.com/dgraph-io/dgraph/dgraph/cmd/zero.(*node).initAndStartNode
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/raft.go:665
github.com/dgraph-io/dgraph/dgraph/cmd/zero.run
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/run.go:337
github.com/dgraph-io/dgraph/dgraph/cmd/zero.init.0.func1
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/run.go:82
github.com/spf13/cobra.(*Command).execute
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/root.go:77
main.main
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/main.go:98
runtime.main
	/home/shiva/go/src/runtime/proc.go:250
runtime.goexit
	/home/shiva/go/src/runtime/asm_amd64.s:1594

github.com/dgraph-io/dgraph/x.Check
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/x/error.go:42
github.com/dgraph-io/dgraph/dgraph/cmd/zero.run
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/run.go:337
github.com/dgraph-io/dgraph/dgraph/cmd/zero.init.0.func1
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/zero/run.go:82
github.com/spf13/cobra.(*Command).execute
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/home/shiva/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/cmd/root.go:77
main.main
	/home/shiva/workspace/dgraph-work/integration-tests/dgraph/dgraph/main.go:98
runtime.main
	/home/shiva/go/src/runtime/proc.go:250
runtime.goexit
	/home/shiva/go/src/runtime/asm_amd64.s:1594
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

4 participants