How to drop predicate data

Following the doc here https://dgraph.io/docs/v1.2.2/clients/#alter-the-database-1, i drop my predicate data with

 curl -X POST localhost:8080/alter -d '{"drop_attr": "useGps"}'

Then It shows

{"data":{"code":"Success","message":"Done"}}

But it’s still there when i call

curl localhost:8080/state

Data is still there and disk usages never reduce. Does anyone know why.

Tagging @ibrahim who worked on this recently and can help with this.

@ibrahim can you help me with this problem

@JimWen The data won’t be removed from disk when you drop/delete anything. The delete operation is logical which means a new entry with delete marker will be added and it will be eventually removed (along with the older keys) by compaction/garbage collection. In simple words, the disk usage won’t be affected instantly by the drop operation.

As for the data showing up in the /state endpoint, that shouldn’t happen. Which version of dgraph are you using? Can you share some logs? It might be possible that the state endpoint is reporting stale data.

Thank you, the version is v1.2.3.
here is the log file bx-bossnlpgraphdbaction-02_202005271543_my.log (24.3 KB)

@JimWen This looks like a bug. Please file an issue on github. We’ll get it fixed soon.

The data was dropped but it looks like state endpoint was still showing it.

Sorry for late reply, i will try this problem on the latest version.