Skip to content

defaultRetentionTimeInMinutes from conf/standalone.conf doesn't do nothing #4755

@freeart

Description

@freeart

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
  1. execute docker-compose.yaml with standalone option command: bash -c "bin/pulsar standalone"
  2. check variables bin/pulsar-admin namespaces get-retention public/default
{
  "retentionTimeInMinutes" : -1,
  "retentionSizeInMB" : -1
}
  1. send message "test" to public/default/my-topic

  2. create reader from public/default/my-topic

  3. message is there

  4. wait about 3 minutes and read again

  5. the topic is empty

  6. stop docker-compose.yaml and clean volumes

  7. execute docker-compose.yaml again

  8. set retention policy through pulsar-admin bin/pulsar-admin namespaces set-retention public/default --size -1 --time -1

  9. check variables bin/pulsar-admin namespaces get-retention public/default

{
  "retentionTimeInMinutes" : -1,
  "retentionSizeInMB" : -1
}
  1. send message "test" to public/default/my-topic
  2. create reader from public/default/my-topic
  3. message is there
  4. wait about 3 minutes and read again
  5. 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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/brokertype/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions