flowchartsman opened a new issue #14031:
URL: https://github.com/apache/pulsar/issues/14031


   **Describe the bug**
   I have a namespace with 4 day retention policy:
   ```
   pulsar-admin namespaces create tenant/ns
   pulsar-admin namespaces set-retention --size -1 --time 1d tenant/ns
   ```
   I also have topic-level policy enabled:
   
   ```
   # Enable or disable system topic
   systemTopicEnabled=true
   
   # The schema compatibility strategy to use for system topics
   systemTopicSchemaCompatibilityStrategy=ALWAYS_COMPATIBLE
   
   # Enable or disable topic level policies, topic level policies depends on 
the system topic
   # Please enable the system topic first.
   topicLevelPoliciesEnabled=true
   ```
   
   When I attempt to turn off the retention policy for a single topic, I get 
either an error 504(Bad gateway) when going through pulsar-proxy or an error 
500 if issuing the command from the broker with pulsar-admin:
   
   ```
   ./pulsar-admin topics set-retention -s 0 -t 0 tenant/ns/mytopic
   00:20:36.472 [AsyncHttpClient-7-1] WARN  
org.apache.pulsar.client.admin.internal.BaseResource - 
[http://localhost:8080/admin/v2/persistent/tenant/ns/mytopic/retention] Failed 
to perform http post request: javax.ws.rs.InternalServerErrorException: HTTP 
500 Internal Server Error
   HTTP 500 Internal Server Error
   ```
   
   There is nothing in the broker or pulsar-proxy logs to indicate the nature 
of this failure.  `get-retention` for the topic appears to work (returns 
`null`), and `delete-retention` appears to succeed, even though no retention 
policy is set for the topic, but I cannot be sure, since I cannot set the 
policy for the topic.
   
   **Expected behavior**
   Topic policy changed
   
   **Desktop (please complete the following information):**
    - OS: n/a
   
   **Additional context**
   The build is at current HEAD for 2.7 branch, so `2.7.5-SNAPSHOT`
   


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