goto / compass

Metadata storage service
https://goto.github.io/compass/
Apache License 2.0
2 stars 0 forks source link

Error when deleting an asset #15

Closed StewartJingga closed 1 year ago

StewartJingga commented 1 year ago

Describe the bug When deleting an asset by its id, compass returned 500 error code. When hitting it for the second time, it returned asset not found.

It seems like the asset is removed but the API returns error on deletion.

To Reproduce Steps to reproduce the behavior:

  1. delete asset - DELETE '/v1beta1/assets/{ASSET_ID}'
  2. see 500 error
  3. hit delete api again with same request
  4. see 404 error

Expected behavior

Additional context found below log during deletion

time="2023-04-18T08:09:22Z" level=error msg="discovery error: DeleteDoc: query: {\"query\":{\"term\":{\"_id\": \"my-asset-id\"}}}: closed" ref=1681805362