pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[feat] admin api/cli to delete package uploaded by pulsar-admin functions upload

Open truong-hua opened this issue 1 year ago • 3 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Motivation

There is pulsar-admin functions upload feature but no delete feature provided. So any file/package uploaded by this method will be in the pulsar storage forever (including anonymous package provided when create a function via API).

Due to some reason, our client team keep uploading package to pulsar functions and seem like now every new pulsar-worker started, it has to download all uploaded package including orphan ones.

Solution

Provide a feature to list and delete orphan package or simply delete a package

Alternatives

Provide a document to manual delete related znode in /pulsar/functions/... and their related entries in bookeepers

Anything else?

No response

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

truong-hua avatar Jan 22 '24 10:01 truong-hua

Can any body help on this? I think the right process is to find related znodes and read their entries. Then remove all bookeepers entries and znodes. But I can not completely understand the logic behind the metadata to be able to implement the feature yet. Hope that anyone can explain the logic.

truong-hua avatar May 03 '24 11:05 truong-hua

There is a delete command available for packages in apache pulsar 3.2.2. admin packages delete Doesn't that already meet your requirements?

sandeep-mst avatar May 30 '24 04:05 sandeep-mst

Hi @sandeep-mst the packages delete only remove the package from packages upload but not functions upload. Currently I found no way to delete functions upload packages, it's great if you can help.

truong-hua avatar Jul 14 '24 17:07 truong-hua