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 2022/07/21 08:11:27 UTC
[GitHub] [pulsar] youzipi opened a new pull request, #16713: [doc][improvement] enable geo-replication at topic level need extra config
youzipi opened a new pull request, #16713:
URL: https://github.com/apache/pulsar/pull/16713
### Motivation
i try to enable the topic level geo-replication in my cluster,
when i execute `./pulsar-admin topics set-replication-clusters public/default/repl-test --clusters standalone,aliyun-test`, i got error:
```java
2022-07-19T09:05:09,444+0000 [AsyncHttpClient-7-1] WARN org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v2/persistent/public/default/repl-test/replication] Failed to perform http post request: javax.ws.rs.NotAllowedException: HTTP 405 Topic level policies is disabled, to enable the topic level policy and retry.
Topic level policies is disabled, to enable the topic level policy and retry.
Reason: Topic level policies is disabled, to enable the topic level policy and retry.
```
after enable the topic error, try again, i got a `500` error:
```
2022-07-21T03:37:17,796+0000 [AsyncHttpClient-7-1] WARN org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v2/persistent/public/default/repl-test/replication] Failed to perform http post request: javax.ws.rs.InternalServerErrorException: HTTP 500 Topic policies service is disabled.
--- An unexpected error occurred in the server ---
Message: Topic policies service is disabled.
Stacktrace:
java.lang.UnsupportedOperationException: Topic policies service is disabled.
at org.apache.pulsar.broker.service.TopicPoliciesService$TopicPoliciesServiceDisabled.updateTopicPoliciesAsync(TopicPoliciesService.java:151)
at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.lambda$internalSetReplicationClusters$215(PersistentTopicsBase.java:3119)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at org.apache.pulsar.client.util.RetryUtil.lambda$executeWithRetry$2(RetryUtil.java:62)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:883)
at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2251)
at org.apache.pulsar.client.util.RetryUtil.executeWithRetry(RetryUtil.java:48)
at org.apache.pulsar.client.util.RetryUtil.lambda$retryAsynchronously$0(RetryUtil.java:42)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
```
after search the doc, i can't found any information about the `Topic policies service`.
then i found these in code:
```java
// org.apache.pulsar.broker.PulsarService#start
// Start topic level policies service
if (config.isTopicLevelPoliciesEnabled() && config.isSystemTopicEnabled()) {
this.topicPoliciesService = new SystemTopicBasedTopicPoliciesService(this);
}
// default value:
private TopicPoliciesService topicPoliciesService = TopicPoliciesService.DISABLED;
```
means i need to configure the `systemTopicEnabled` **too**,
the error msg is some of confusing.
i also think that we need more information about the `topic policy service`
### Modifications
add necessary tips
### Documentation
Check the box below or label this PR directly.
Need to update docs?
- [x] `doc`
(Your PR contains doc changes)
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] youzipi commented on pull request #16713: [doc][improvement] enable geo-replication at topic level need extra config
Posted by GitBox <gi...@apache.org>.
youzipi commented on PR #16713:
URL: https://github.com/apache/pulsar/pull/16713#issuecomment-1192125908
this tip should be displayed in all `2.10.x` versions doc **at least**.
this configuration is enabled defaultlly after 2.11.0
![image](https://user-images.githubusercontent.com/5629307/180352295-e1a8ab0a-b866-4e3a-9011-ed22613412bc.png)
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] youzipi commented on pull request #16713: [doc][improvement] enable geo-replication at topic level need extra config
Posted by GitBox <gi...@apache.org>.
youzipi commented on PR #16713:
URL: https://github.com/apache/pulsar/pull/16713#issuecomment-1191186248
@Anonymitaet
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui merged pull request #16713: [doc][improvement] enable geo-replication at topic level need extra config
Posted by GitBox <gi...@apache.org>.
codelipenghui merged PR #16713:
URL: https://github.com/apache/pulsar/pull/16713
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org