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/06/30 02:37:52 UTC
[GitHub] [pulsar] gaozhangmin opened a new pull request, #16292: [improve][standalone]Remove check if default namespace exists
gaozhangmin opened a new pull request, #16292:
URL: https://github.com/apache/pulsar/pull/16292
### Motivation
When startup of standalone, the below error would be throw
```
2022-06-27T21:29:38,779+0800 [client-scheduler-OrderedScheduler-0-0] ERROR org.apache.bookkeeper.clients.impl.internal.RootRangeClientImplWithRetries - Reason for the failure {}
io.grpc.StatusRuntimeException: NOT_FOUND
at io.grpc.Status.asRuntimeException(Status.java:535) ~[io.grpc-grpc-api-1.42.1.jar:1.42.1]
at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:534) ~[io.grpc-grpc-stub-1.42.1.jar:1.42.1]
at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:463) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:427) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:460) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:562) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:743) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:722) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) ~[io.grpc-grpc-core-1.42.1.jar:1.42.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_312]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_312]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
```
Mistakenly thought the startup failed。
### Modifications
Remove `admin.getNamespace("default")` before creating namepsace.
Instead, throw `NamespaceExistsException ` if namespace exists.
### Documentation
Check the box below or label this PR directly.
Need to update docs?
- [x] `doc-not-needed`
--
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] gaozhangmin closed pull request #16292: [improve][standalone]Remove check if default namespace exists
Posted by GitBox <gi...@apache.org>.
gaozhangmin closed pull request #16292: [improve][standalone]Remove check if default namespace exists
URL: https://github.com/apache/pulsar/pull/16292
--
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] RobertIndie commented on a diff in pull request #16292: [improve][standalone]Remove check if default namespace exists
Posted by GitBox <gi...@apache.org>.
RobertIndie commented on code in PR #16292:
URL: https://github.com/apache/pulsar/pull/16292#discussion_r910578144
##########
pulsar-broker/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java:
##########
@@ -369,21 +369,16 @@ public void runStreamStorage(CompositeConfiguration conf) throws Exception {
.build())
.buildAdmin()) {
+ LOG.info("Creating default namespace");
try {
- NamespaceProperties ns = FutureUtils.result(admin.getNamespace("default"));
Review Comment:
Could you explain in detail how these codes causes this exception? `io.grpc.StatusRuntimeException: NOT_FOUND`
--
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] gaozhangmin commented on a diff in pull request #16292: [improve][standalone]Remove check if default namespace exists
Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on code in PR #16292:
URL: https://github.com/apache/pulsar/pull/16292#discussion_r910976724
##########
pulsar-broker/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java:
##########
@@ -369,21 +369,16 @@ public void runStreamStorage(CompositeConfiguration conf) throws Exception {
.build())
.buildAdmin()) {
+ LOG.info("Creating default namespace");
try {
- NamespaceProperties ns = FutureUtils.result(admin.getNamespace("default"));
Review Comment:
It was throw by
```
private void processGetNamespaceResponse(String namespace,
GetNamespaceResponse response,
CompletableFuture<NamespaceProperties> getFuture) {
StatusCode code = response.getCode();
if (StatusCode.SUCCESS == code) {
getFuture.complete(response.getNsProps());
return;
}
getFuture.completeExceptionally(createRootRangeException(namespace, code));
}
```
##########
pulsar-broker/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java:
##########
@@ -369,21 +369,16 @@ public void runStreamStorage(CompositeConfiguration conf) throws Exception {
.build())
.buildAdmin()) {
+ LOG.info("Creating default namespace");
try {
- NamespaceProperties ns = FutureUtils.result(admin.getNamespace("default"));
Review Comment:
It was throw by createRootRangeException
```
private void processGetNamespaceResponse(String namespace,
GetNamespaceResponse response,
CompletableFuture<NamespaceProperties> getFuture) {
StatusCode code = response.getCode();
if (StatusCode.SUCCESS == code) {
getFuture.complete(response.getNsProps());
return;
}
getFuture.completeExceptionally(createRootRangeException(namespace, code));
}
```
--
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