-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Crash server when failed to convert facet value #2074
Comments
This issue is reproducible when querying for a facet as @munisystem I doubt mutation performance would improve much because of this as parsing the facet is not the bottleneck. You should typically use the JSON format to set the facets or the string format (as part of RDF's). Though if you really want to set it like this, I'd suggest using FacetFor so that value is converted to a format the server expects. |
I guess so. this json object doesn't apply facets {
"name": "Alice",
"friend": [
{
"name": "Bob",
"~friend|close": "yes"
},
{
"name": "Carol",
"~friend|close": "no"
},
]
} So I have to divide query adding "Alice" and friends or to use string formats.
Sounds good. |
Try with the JSON below. You don't need to add
|
I use
api.Faset{}
to improve mutation performance with go client.Just as follow.
But this code cause server to crash.
( Valuable of
api.Faset.Value
is invalid. Actually, should be usedtime.Now().MarshalBinary()
)Because call
log.Fatal()
when failed to convert facet value.e.g.
dgraph/types/facets/utils.go
Lines 199 to 200 in 5e47b20
dgraph/x/error.go
Lines 57 to 75 in 02dc3bd
I think that should be return error instead of
log.Fatal()
in public API.How about you?
The text was updated successfully, but these errors were encountered: