apache / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://gravitino.apache.org
Apache License 2.0
1.1k stars 345 forks source link

[Bug report] Return "dropped":true when run curl -X DELETE http://localhost:8090/api/metalakes/metalake_demo/tags/null #4817

Closed danhuawang closed 1 month ago

danhuawang commented 2 months ago

Version

main branch

Describe what's wrong

curl -X POST -H "Accept: application/vnd.gravitino.v1+json" \
-H "Content-Type: application/json" -d '{
  "tagsToAdd": ["tag1", "tag2"],
  "tagsToRemove": ["tag3"]
}' http://localhost:8090/api/metalakes/metalake_demo/tags/catalog/catalog_postgres
{"code":0,"names":["tag2"]}

curl -X GET -H "Accept: application/vnd.gravitino.v1+json" \
http://localhost:8090/api/metalakes/metalake_demo/tags/catalog/catalog_postgres
{"code":0,"names":["tag2"]} 

curl -X DELETE -H "Accept: application/vnd.gravitino.v1+json" \
http://localhost:8090/api/metalakes/metalake_demo/tags/null
{"code":0,"dropped":true}

curl -X DELETE -H "Accept: application/vnd.gravitino.v1+json" \
http://localhost:8090/api/metalakes/metalake_demo/tags/null
{"code":0,"dropped":false}

curl -X GET -H "Accept: application/vnd.gravitino.v1+json" \   
http://localhost:8090/api/metalakes/metalake_demo/tags/catalog/catalog_postgres
{"code":0,"names":[]}                            

Error message and/or stacktrace

N/A

How to reproduce

N/A

Additional context

No response

jerryshao commented 2 months ago

@danhuawang What is the issue here?

jerryshao commented 1 month ago

Will be fixed by #5235 .