dgraph icon indicating copy to clipboard operation
dgraph copied to clipboard

Server crash when gRPC call has schema update without tokenizer

Open mpires opened this issue 9 years ago • 1 comments

The dGraph server crashes when I invoke a gRPC call with a mutation to add a few NQuads:

Schema.SchemaUpdate schemaUpdate = Schema.SchemaUpdate.newBuilder()
                .setDirective(Schema.SchemaUpdate.Directive.INDEX)
                .setPredicate("view")
                .build();

Graphresponse.Mutation mutation = Graphresponse.Mutation.newBuilder()
                .addSchema(schemaUpdate)
                .addAllSet(quads)
                .build();

Graphresponse.Request request = Graphresponse.Request.newBuilder()
                .setMutation(mutation)
                .build();

client.run(request);

The server's console output after running it:

2017/06/05 00:08:51 error.go:76: No default tokenizer set for type 0

I reckon this isn't normal behaviour, even if such a request is invalid, the server should be resillient my tomfoolery

mpires avatar Jun 04 '17 23:06 mpires

A fix has been merged to master and release/v0.7.7.

pawanrawal avatar Jun 06 '17 02:06 pawanrawal