You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/09 13:54:58 UTC

[GitHub] [pulsar] murong00 opened a new issue #13217: Package management filesystem storage doesn't work

murong00 opened a new issue #13217:
URL: https://github.com/apache/pulsar/issues/13217


   **Describe the bug**
   Currently, the package management filesystem storage doesn't work, when using `pulsar-admin packages upload` command to upload a new package, it throws error as below:
   ```
   $ bin/pulsar-admin packages upload function://public/default/test@v1.0 --path examples/test --description my-test-pack
   Package 'function://public/default/test@v1.0' already exists
   
   Reason: Package 'function://public/default/test@v1.0' already exists
   ```
   **Expected behavior**
   The  `packages` commands can work as expected.
   
   **Additional context**
   This is because `packagePath` is the parent path of `metadataPath` 
   https://github.com/apache/pulsar/blob/65046cae51f4b6d3b727619358ad50695d2a1712/pulsar-package-management/core/src/main/java/org/apache/pulsar/packages/management/core/impl/PackagesManagementImpl.java#L246-L252
   and action `checkMetadataExistsAndThrowException` precedes action `checkPackageExistsAndThrowException`, but `FileSystemPackagesStorage.existAsync()` method creates the parent file if not exists like below:
   https://github.com/apache/pulsar/blob/65046cae51f4b6d3b727619358ad50695d2a1712/pulsar-package-management/filesystem-storage/src/main/java/org/apache/pulsar/packages/management/storage/filesystem/FileSystemPackagesStorage.java#L61-L69
   that is, the `packagePath` always already exists when uploading a new package.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] murong00 closed issue #13217: Package management filesystem storage doesn't work

Posted by GitBox <gi...@apache.org>.
murong00 closed issue #13217:
URL: https://github.com/apache/pulsar/issues/13217


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org