[BUG]: Drop Type does not work as expected in self hosted dgraph
fcavazzoli opened this issue · comments
What version of Dgraph are you using?
v23.0.1
Tell us a little more about your go-environment?
No response
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, CPU, OS)?
Self hosted cluster in AWS
2 CPUs
4Gb RAM
OS: linux (amd64)
What steps will reproduce the bug?
- create a schema with multiple types in it
- Make mutations in some types
- call
curl -X POST localhost:8080/alter -d '{"drop_op": "TYPE", "drop_value": "TypeYouWantToDrop"}'
Expected behavior and actual result.
I expect for the type to be dropped but to keep the schema.
result:
The request returns success, but type still there and data is still there
Additional information
No response
Sorry, but where did you see that you can drop types? You could delete the type, but not "drop" expecting some recursive delete.
Well, that would be a feature request. But you won't see any of this in short or mid term.
The Type system isn't as robust and complete as it might seem. It's just an internal reference point in Dgraph that helps the user determine types. But there are no special methods. Not even a way to delete objects of a certain type.
Dgraph is an nquads based database. A subject, a predicate and a value. All drop methods happen at the predicate level and not at the Type level.