Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend ZK for Pulsar standalone #871

Merged
merged 4 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/getting-started-docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ services:
## Step 2: Create a Pulsar cluster

As preparation, create data directories and change the data directory ownership to uid(10000) which is the default user id used in the Pulsar Docker container.

```bash
sudo mkdir -p ./data/zookeeper ./data/bookkeeper
# this step might not be necessary on other than Linux platforms
sudo chown 10000 -R data
sudo chown -R 10000 data
```

To create a Pulsar cluster by using the `compose.yml` file, run the following command.
Expand Down
16 changes: 16 additions & 0 deletions docs/getting-started-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ bin/pulsar standalone
</Tabs>
````

:::tip

You may encounter issues with the default RocksDB metadata store after restarting Pulsar standalone.

We recommend you consider using the following environment variable to use ZooKeeper as the metadata store:

```
...
-e PULSAR_STANDALONE_USE_ZOOKEEPER=1 \
...
```

Don't apply this fix for existing Pulsar standalone instances if you don't want to loose your data.

:::

If you want to change Pulsar configurations and start Pulsar, run the following command by passing environment variables with the `PULSAR_PREFIX_` prefix. See [default configuration file](https://github.com/apache/pulsar/blob/e6b12c64b043903eb5ff2dc5186fe8030f157cfc/conf/standalone.conf) for more details.

````mdx-code-block
Expand Down
16 changes: 16 additions & 0 deletions versioned_docs/version-3.0.x/getting-started-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ For macOS, Linux, and Windows, run the following command to start Pulsar within
docker run -it -p 6650:6650 -p 8080:8080 --mount source=pulsardata,target=/pulsar/data --mount source=pulsarconf,target=/pulsar/conf apachepulsar/pulsar:@pulsar:version@ bin/pulsar standalone
```

:::tip

You may encounter issues with the default RocksDB metadata store after restarting Pulsar standalone.

We recommend you consider using the following environment variable to use ZooKeeper as the metadata store:

```
...
-e PULSAR_STANDALONE_USE_ZOOKEEPER=1 \
...
```

Don't apply this fix for existing Pulsar standalone instances if you don't want to loose your data.

:::

If you want to change Pulsar configurations and start Pulsar, run the following command by passing environment variables with the `PULSAR_PREFIX_` prefix. See [default configuration file](https://github.com/apache/pulsar/blob/e6b12c64b043903eb5ff2dc5186fe8030f157cfc/conf/standalone.conf) for more details.

```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ services:
## Step 2: Create a Pulsar cluster

As preparation, create data directories and change the data directory ownership to uid(10000) which is the default user id used in the Pulsar Docker container.

```bash
sudo mkdir -p ./data/zookeeper ./data/bookkeeper
# this step might not be necessary on other than Linux platforms
sudo chown 10000 -R data
sudo chown -R 10000 data
```

To create a Pulsar cluster by using the `compose.yml` file, run the following command.
Expand Down
16 changes: 16 additions & 0 deletions versioned_docs/version-3.2.x/getting-started-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ bin/pulsar standalone
</Tabs>
````

:::tip

You may encounter issues with the default RocksDB metadata store after restarting Pulsar standalone.

We recommend you consider using the following environment variable to use ZooKeeper as the metadata store:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good idea to recommend not to use a default setting. If we have a bug in default configuration, we must fix it. If it cannot be fixed, we will have to change the defaults.

Copy link
Member Author

@visortelle visortelle Mar 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be the best solution. @lhotari 's concern was that:

it would have to be documented since many might be using old versions and wondering about the resolution.
The problem in changing the default is that it would break existing "deployments" with data

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good idea to recommend not to use a default setting. If we have a bug in default configuration, we must fix it. If it cannot be fixed, we will have to change the defaults.

@merlimat I agree. Since we cannot change already released versions and users are hitting problems, I think it's worth documenting the workaround until there's a better solution. It seems that there isn't a nice way to solve this problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge this PR with the current content. We can come back to this later once there's a better resolution.


```
...
-e PULSAR_STANDALONE_USE_ZOOKEEPER=1 \
...
```

Don't apply this fix for existing Pulsar standalone instances if you don't want to loose your data.

:::

If you want to change Pulsar configurations and start Pulsar, run the following command by passing environment variables with the `PULSAR_PREFIX_` prefix. See [default configuration file](https://github.com/apache/pulsar/blob/e6b12c64b043903eb5ff2dc5186fe8030f157cfc/conf/standalone.conf) for more details.

````mdx-code-block
Expand Down
Loading