-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Set splitNamespaceBundle with readonly=false
.
#14680
Conversation
This is not for cluster only, standalone is also not work. My test could reproduce. |
I deleted my reply at this moment. I'll dig deeper into this issue. |
I think the difference is that when I ran a standalone, each bundle was owned by the broker because I've sent some messages to some partitions. See the original code snippet: try (PulsarClient client = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build()) {
for (int i = 0; i < numPartitions; i++) {
client.newProducer().topic(topic + TopicName.PARTITIONED_TOPIC_SUFFIX + i)
.create().send("1".getBytes());
}
} When I debugged in a standalone, i.e. the There is another weird thing I've described in #14668. I'm not sure if it's related.
Maybe some bundles were not owned by the broker. I'll try to split all bundle ranges to see if there is any bundle range that can be split. |
It works now. When I ran a standalone, there were 4 bundle ranges. However, when I ran a cluster, there were 16 bundle ranges and some bundle ranges were not owned. I think we need another issue to track the issue that |
Master Issue: #14668 Fixes: #14668 ### Motivation When we split a not loaded namespace bundle, we will meet the below error: ``` Failed to find ownership for ServiceUnit:tenant/namespace/0x00000000_0x10000000 ``` Because when validating namespace bundle ownership with `readonly=true` : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L1145-L1151 and if the bundle is not owned by any broker, it will return empty(line-392): https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java#L388-L400 so throw the below exception : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L576-L582 ### Modification - Change readonly from `true` to `false` when validating namespace bundle ownership. (cherry picked from commit 4ffef1a)
Master Issue: #14668 Fixes: #14668 ### Motivation When we split a not loaded namespace bundle, we will meet the below error: ``` Failed to find ownership for ServiceUnit:tenant/namespace/0x00000000_0x10000000 ``` Because when validating namespace bundle ownership with `readonly=true` : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L1145-L1151 and if the bundle is not owned by any broker, it will return empty(line-392): https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java#L388-L400 so throw the below exception : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L576-L582 ### Modification - Change readonly from `true` to `false` when validating namespace bundle ownership. (cherry picked from commit 4ffef1a)
Master Issue: #14668 Fixes: #14668 ### Motivation When we split a not loaded namespace bundle, we will meet the below error: ``` Failed to find ownership for ServiceUnit:tenant/namespace/0x00000000_0x10000000 ``` Because when validating namespace bundle ownership with `readonly=true` : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L1145-L1151 and if the bundle is not owned by any broker, it will return empty(line-392): https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java#L388-L400 so throw the below exception : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L576-L582 ### Modification - Change readonly from `true` to `false` when validating namespace bundle ownership. (cherry picked from commit 4ffef1a)
Master Issue: apache#14668 Fixes: apache#14668 ### Motivation When we split a not loaded namespace bundle, we will meet the below error: ``` Failed to find ownership for ServiceUnit:tenant/namespace/0x00000000_0x10000000 ``` Because when validating namespace bundle ownership with `readonly=true` : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L1145-L1151 and if the bundle is not owned by any broker, it will return empty(line-392): https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java#L388-L400 so throw the below exception : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L576-L582 ### Modification - Change readonly from `true` to `false` when validating namespace bundle ownership. (cherry picked from commit 4ffef1a) (cherry picked from commit 43f2562)
Master Issue: apache#14668 Fixes: apache#14668 ### Motivation When we split a not loaded namespace bundle, we will meet the below error: ``` Failed to find ownership for ServiceUnit:tenant/namespace/0x00000000_0x10000000 ``` Because when validating namespace bundle ownership with `readonly=true` : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L1145-L1151 and if the bundle is not owned by any broker, it will return empty(line-392): https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java#L388-L400 so throw the below exception : https://github.com/apache/pulsar/blob/fe7e55d9f353925a559e88f8ceef2b47b59668e0/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L576-L582 ### Modification - Change readonly from `true` to `false` when validating namespace bundle ownership.
Master Issue: #14668
Fixes: #14668
Motivation
When we split a not loaded namespace bundle, we will meet the below error:
Because when validating namespace bundle ownership with
readonly=true
:pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
Lines 1145 to 1151 in fe7e55d
and if the bundle is not owned by any broker, it will return empty(line-392):
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
Lines 388 to 400 in fe7e55d
so throw the below exception :
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
Lines 576 to 582 in fe7e55d
Modification
true
tofalse
when validating namespace bundle ownership.Documentation
no-need-doc