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 2019/07/18 08:27:05 UTC
[GitHub] [pulsar] freeart opened a new issue #4755:
defaultRetentionTimeInMinutes from conf/standalone.conf doesn't do nothing
freeart opened a new issue #4755: defaultRetentionTimeInMinutes from conf/standalone.conf doesn't do nothing
URL: https://github.com/apache/pulsar/issues/4755
**Describe the bug**
```defaultRetentionTimeInMinutes``` from ```standalone.conf``` doesn't affect to the real behavior
But ```bin/pulsar-admin namespaces set-retention public/default --size -1 --time -1```
works fine
**To Reproduce**
Steps to reproduce the behaviour:
1. mount volume in ```docker-compose.yaml``` file ```'docker/pulsar/conf/standalone.conf:/pulsar/conf/standalone.conf'``` and set retention policy
```
defaultRetentionTimeInMinutes=-1
defaultRetentionSizeInMB=-1
```
2. execute ```docker-compose.yaml``` with standalone option ```command: bash -c "bin/pulsar standalone"```
3. check variables ```bin/pulsar-admin namespaces get-retention public/default```
```json
{
"retentionTimeInMinutes" : -1,
"retentionSizeInMB" : -1
}
```
4. send message "test" to public/default/my-topic
5. create reader from public/default/my-topic
6. message is there
7. wait about 3 minutes and read again
8. the topic is empty
9. stop ```docker-compose.yaml``` and clear volumes
10. execute ```docker-compose.yaml``` again
11. set retention policy through pulsar-admin ```bin/pulsar-admin namespaces set-retention public/default --size -1 --time -1```
12. check variables ```bin/pulsar-admin namespaces get-retention public/default```
```json
{
"retentionTimeInMinutes" : -1,
"retentionSizeInMB" : -1
}
```
13. send message "test" to public/default/my-topic
14. create reader from public/default/my-topic
15. message is there
16. wait about 3 minutes and read again
17. message is still there
**Expected behavior**
The message should be in topic after 2 minutes when ```defaultRetentionTimeInMinutes=-1``` configured in ```standalone.conf```
**Desktop (please complete the following information):**
- OS: Official docker 2.4.0
**Additional context**
docker-compose.yaml
```yaml
version: '3'
services:
zookeeper:
container_name: zookeeper
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
volumes:
- './docker/zookeeper/data:/var/lib/zookeeper/data'
- './docker/zookeeper/log:/var/lib/zookeeper/log'
pulsar:
container_name: pulsar
hostname: pulsar
ports:
- '6650:6650'
- '9000:8080'
volumes:
- './docker/pulsar/data:/pulsar/data'
- './docker/pulsar/conf/standalone.conf:/pulsar/conf/standalone.conf'
depends_on:
- zookeeper
image: 'apachepulsar/pulsar:2.4.0'
command: bash -c "bin/pulsar standalone"
pulsar-dashboard:
container_name: pulsar-dashboard
image: apachepulsar/pulsar-dashboard
ports:
- '9001:80'
environment:
SERVICE_URL: http://pulsar:9000
depends_on:
- pulsar
```
----------------------------------------------------------------
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
With regards,
Apache Git Services