Anthony-Bible opened a new issue, #16082:
URL: https://github.com/apache/pulsar/issues/16082

   **Describe the bug**
   A clear and concise description of what the bug is.
   When running set-retention with no units for the time. It defaults to 
seconds when --help says the default measurment is in seconds
   **To Reproduce**
   Steps to reproduce the behavior:
   In pulsar 2.7.0, issue the following command:
   ```
     pulsar-admin namespaces set-retention dev/foo \
       --size 1024M \
       --time 1440
       ```
   After that is set run 
   ```
   pulsar-toolset-0:/pulsar# pulsar-admin namespaces get-retention dev/foo
   {
     "retentionTimeInMinutes" : 24,
     "retentionSizeInMB" : 9536
   }
   ```
   
   **Expected behavior**
   This should in fact set the retention time to 1440 minutes like it says in 
the help docs:
   ```
   pulsar-toolset-0:/pulsar# pulsar-admin namespaces set-retention --help
   The following options are required: [--size | -s], [--time | -t]
   
   Set the retention policy for a namespace
   Usage: set-retention [options] tenant/namespace
     Options:
     * --size, -s
         Retention size limit (eg: 10M, 16G, 3T). 0 or less than 1MB means no 
         retention and -1 means infinite size retention
     * --time, -t
         Retention time in minutes (or minutes, hours,days,weeks eg: 100m, 3h, 
         2d, 5w). 0 means no retention and -1 means infinite time retention
   
   
   
   ```
   
   
   **Additional context**
   While at this time I can not confirm it still sets it this way in 2.9.0, I 
did find in 2.9.0 the help still says it defaults to minutes which makes me 
believe this is a bug or an undocumented change. 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to