Error: Package Metadata Conflict When Recreating a Function with the Same Name
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
Pulsar Version : 2.11.1
### Minimal reproduce step
The issue is related to creating and recreating functions within a development environment. The problem occurs when a function is initially created, subsequently deleted, and an attempt is made to recreate it using the same name. The error message received during the recreation attempt is as follows:
"detail": "code: 500, message: {"reason":"Package 'function://orgGroup1/org1tets1/licenseplate@0' metadata already exists"}, serviceUrl: http://standalone:8080/admin/v3/functions/orgGroup1/org1tets1/licenseplate"
### What did you expect to see?
Function creation should be successful.
### What did you see instead?
"detail": "code: 500, message: {"reason":"Package 'function://orgGroup1/org1tets1/licenseplate@0' metadata already exists"}, serviceUrl: http://standalone:8080/admin/v3/functions/orgGroup1/org1tets1/licenseplate"
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by reproducing the create, delete, and recreate sequence for the function named licenseplate on Pulsar 2.11.1, using the reported service URL and metadata-conflict response. Trace the function package metadata cleanup and recreation entry points, then verify that recreating the same function name succeeds without an existing-metadata error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100