Tour of go panics on 1.2.1

Moved from GitHub tutorial/129

Posted by milosgajdos:

What version of Dgraph are you using?

Dgraph version   : v1.2.1
Dgraph SHA-256   : 3f18ff84570b2944f4d75f6f508d55d902715c7ca2310799cc2991064eb046f8
Commit SHA-1     : ddcda9296
Commit timestamp : 2020-02-06 15:31:05 -0800
Branch           : HEAD
Go version       : go1.13.5

Have you tried reproducing the issue with the latest release?

This is the latest release.

What is the hardware spec (RAM, OS)?

macOS Catalina
10.15.3 (19D76)

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

I’m following the tour of Dgraph and in Data, More Data lesson dgraph panics when importing the data as per description here

$ docker exec -it dgraph dgraph live -f 1million.rdf.gz --alpha localhost:9080 --zero localhost:5080 -c 1
[Decoder]: Using assembly version of decoder
I0315 17:34:37.060637      96 init.go:98]

Dgraph version   : v1.2.1
Dgraph SHA-256   : 3f18ff84570b2944f4d75f6f508d55d902715c7ca2310799cc2991064eb046f8
Commit SHA-1     : ddcda9296
Commit timestamp : 2020-02-06 15:31:05 -0800
Branch           : HEAD
Go version       : go1.13.5

For Dgraph official documentation, visit https://docs.dgraph.io.
For discussions about Dgraph     , visit http://discuss.dgraph.io.
To say hi to the community       , visit https://dgraph.slack.com.

Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2018 Dgraph Labs, Inc.



Running transaction with dgraph endpoint: localhost:9080
Found 1 data file(s) to process
Processing data file "1million.rdf.gz"
panic: interface conversion: interface {} is *time.Time, not time.Time

goroutine 72 [running]:
github.com/dgraph-io/dgraph/tok.YearTokenizer.Tokens(0x18732a0, 0xc000d717a0, 0x10, 0xc002eb0830, 0x14, 0xc002eee5d3, 0xc000442700)
	/tmp/go/src/github.com/dgraph-io/dgraph/tok/tok.go:214 +0x185
github.com/dgraph-io/dgraph/tok.BuildTokens(0x18732a0, 0xc000d717a0, 0x1a864e0, 0x249ab50, 0x1a864e0, 0x249ab50, 0x0, 0x1, 0xc002eb0820)
	/tmp/go/src/github.com/dgraph-io/dgraph/tok/tok.go:104 +0x63
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForNQuad(0xc000244000, 0xc00306a5a0, 0x10, 0x2, 0x2, 0x0, 0x0)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:309 +0x49e
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForReq(0xc000244000, 0xc0028a1f88, 0xc00450e001, 0x6a7, 0x800)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:330 +0xe9
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).makeRequests(0xc000244000)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:392 +0x1db
created by github.com/dgraph-io/dgraph/dgraph/cmd/live.setup
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/run.go:359 +0x2f0

It seems like the type assertion is failing, not matching the expected type. I’d be happy to open a PR, but I wonder if there is something else I might be missing. I’m literally copy-paste-ing the commands from the tour as I go through the exercise one by one.

Expected behaviour and actual result.

I expect the data to be imported into the DGraph.

MichelDiz commented :

This is already being addressed by Panic importing back exported data: interface conversion: interface {} is *int64, not int64 · Issue #4889 · dgraph-io/dgraph · GitHub

milosgajdos commented :

Thanks, @MichelDiz. Next time I’ll do a proper search on issues :innocent:

Closing this now.