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

Panic importing back exported data: interface conversion: interface {} is *int64, not int64 #4889

Closed
PabloCastellano opened this issue Mar 5, 2020 · 4 comments
Assignees
Labels
area/live-loader Issues related to live loading. status/accepted We accept to investigate/work on it.

Comments

@PabloCastellano
Copy link
Contributor

PabloCastellano commented Mar 5, 2020

What version of Dgraph are you using?

docker v2.0.0-beta

Have you tried reproducing the issue with the latest release?

Yes, tried with docker-master

What is the hardware spec (RAM, OS)?

I'm running dgraph in my laptop (Ubuntu 18.04 with 8GB RAM)

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

I've exported the data using the /admin/export endpoint and I can't import it back using the live loader. For simplicity, create the following files with their contents:

float.rdf

<_:blank> <cap> "3005.060059"^^<xs:float> .

integer.rdf

<_:blank> <ida> "991"^^<xs:int> .

data.schema

<cap>: float @index(float) .
<ida>:int @index(int) .

Now run dgraph live -s data.schema -f integer.rdf and dgraph live -s data.schema -f float.rdf

Expected behaviour and actual result.

The exported data should be re-importable. However I get the following crash traces:

github.com/dgraph-io/dgraph/tok.IntTokenizer.Tokens(...)
	/tmp/go/src/github.com/dgraph-io/dgraph/tok/tok.go:193
github.com/dgraph-io/dgraph/tok.BuildTokens(0x1701a20, 0xc000294120, 0x1b6cf00, 0x27cf360, 0x1b6cf00, 0x27cf360, 0x0, 0x1, 0xc0002714a0)
	/tmp/go/src/github.com/dgraph-io/dgraph/tok/tok.go:107 +0x63
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForNQuad(0xc000124380, 0xc0005083f0, 0x1, 0xc000294000, 0xc0000d5c80, 0x0, 0xc0002f7080)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:313 +0x4a8
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForReq(0xc000124380, 0xc000522788, 0x1, 0xc00010ac80, 0x0)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:334 +0xe9
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).makeRequests(0xc000124380)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:396 +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
github.com/dgraph-io/dgraph/tok.FloatTokenizer.Tokens(...)
	/tmp/go/src/github.com/dgraph-io/dgraph/tok/tok.go:205
github.com/dgraph-io/dgraph/tok.BuildTokens(0x17018e0, 0xc0003c0360, 0x1b6cd20, 0x27cf360, 0x1b6cd20, 0x27cf360, 0x0, 0x1, 0xc00068e000)
	/tmp/go/src/github.com/dgraph-io/dgraph/tok/tok.go:107 +0x63
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForNQuad(0xc0001960e0, 0xc0002b6ea0, 0x1, 0xc0003c0310, 0xc0000d4780, 0x0, 0xc0005e2a80)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:313 +0x4a8
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForReq(0xc0001960e0, 0xc0005da788, 0x1, 0xc00010b900, 0x0)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:334 +0xe9
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).makeRequests(0xc0001960e0)
	/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:396 +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

For what it's worth, #4468 looks very similar. My gut feeling tells me that the fix was not complete and is now causing the same issue for other types. I can't reproduce this issue in v1.2.1.

@MichelDiz
Copy link
Contributor

It is the same issue from #4468. The thing is that we had released RC1 and Beta a few days before this commit #4793

If you are using Docker, you can try master (it was updated 6 hours ago)

docker pull dgraph/dgraph:master

@PabloCastellano
Copy link
Contributor Author

Hi @MichelDiz. At the moment of writing this report, I could reproduce the same issue using latest docker dgraph:master

@danielmai danielmai added area/live-loader Issues related to live loading. status/accepted We accept to investigate/work on it. labels Mar 6, 2020
@MichelDiz
Copy link
Contributor

Okay, thanks for checking the master. We are checking it. And gonna backport it to v1.2.x.

@danielmai
Copy link
Contributor

danielmai commented Mar 30, 2020

This is fixed by #5012.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/live-loader Issues related to live loading. status/accepted We accept to investigate/work on it.
Development

No branches or pull requests

4 participants