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 2020/10/22 17:19:42 UTC

[GitHub] [pulsar] lhotari opened a new issue #8346: [Admin API] Prevent setting an invalid Retention Policy

lhotari opened a new issue #8346:
URL: https://github.com/apache/pulsar/issues/8346


   **Problem**
   Currently if one [sets in the retention policy](https://pulsar.apache.org/docs/en/2.6.1/cookbooks-retention-expiry/#set-retention-policy) `--time` to some value and sets `--size` to 0, this will lead to the situation where there is no retention. Such retention policy should be rejected since the time setting will have no meaning when size is 0. (the same applies the other way around, setting time to 0 and size to some value)
   
   **Describe the solution you'd like**
   An retention policy where either time or size is non-zero and other is zero should be rejected in validation. This would be useful to prevent users creating invalid retention policies. 
   
   **Additional context**
   #8345 
   


----------------------------------------------------------------
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.

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



[GitHub] [pulsar] codelipenghui closed issue #8346: [Admin API] Prevent setting an invalid Retention Policy

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


   


----------------------------------------------------------------
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.

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



[GitHub] [pulsar] addisonj commented on issue #8346: [Admin API] Prevent setting an invalid Retention Policy

Posted by GitBox <gi...@apache.org>.
addisonj commented on issue #8346:
URL: https://github.com/apache/pulsar/issues/8346#issuecomment-714641453


   As a bit of a truth table for what configurations should be valid:
   
   both greater than zero: valid
   both -1: valid
   both 0: valid
   one greater than, one -1: valid
   one 0, the other greater than 0 or -1: invalid
   
   


----------------------------------------------------------------
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.

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