Drop all partially works for schema


(Mehdi Yousfi) #1

Hello,

For my tests I use the {DropAll: true} alteration with the go client at the beginning of my tests, the I set the schema. Works fine with the tests, also data and schema are as expected when I look them from ratel.

But each time I run my tests, it adds a new bulk of:

2018/09/08 12:09:00 mutation.go:141: Done schema update predicate [...]

to the logs of the dgraph server.

So let’s say my schema has 10 indexes defined, so after running 10 times my tests, when I start the dgraph test server I get 100 “update predicate” lines in my log.
And of course it slows progressively the starting of the dgraph test server.

If I remove the data folders, it clears that aggregation but after that it keeps growing again.


(Michel Conrado (Support Engineer)) #2

The solution is simple, use “-s schema.schema” in BulkLoad in the first setup.
In other bulkloads do not use the flag -s.


(Mehdi Yousfi) #3

Sorry but this is not a bulk load, I just start the server normally with a supposedly empty database


(Michel Conrado (Support Engineer)) #4

All ten times you do your tests, do you clean the Dgraph?


(Mehdi Yousfi) #5

Yes. As I said, I systematically do a drop all and then an alter schema at the beginning of my tests.
In ratel, the database is fine: No data, schema well defined.
But when I start the server, the schema seems to be duplicated as many times as I launched my tests. According to the logs anyway


(Daniel Mai) #6

This looks like a bug. Can you file an issue on GitHub?


(Mehdi Yousfi) #7

I cannot reproduce it anymore.
If it ever happens again, I’ll submit an issue.
Thanks.