You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
loadAllNamespaceResourceGroups(); // THIS IS ASYNC 2
will invoke
rgService.registerNameSpace(policy.resource_group_name, ns);
then
private ResourceGroup checkResourceGroupExists(String rgName) throws PulsarAdminException {
ResourceGroup rg = this.getResourceGroupInternal(rgName);
if (rg == null) {
throw new PulsarAdminException("Resource group does not exist: " + rgName);
}
return rg;
}
inside
/**
* Get the RG with the given name. For internal operations only.
*/
private ResourceGroup getResourceGroupInternal(String resourceGroupName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Invalid null resource group name: " + resourceGroupName);
}
return resourceGroupsMap.get(resourceGroupName);
}
if 2 run earlier than 1, it will occur error, if no namespace add/delete, it won't recover.
To Reproduce
review the code
Expected behavior
A clear and concise description of what you expected to happen.
maybe we need loadAllResourceGroups sync, or when it done, then loadAllNamespaceResourceGroups
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: [e.g. iOS]
Additional context
Add any other context about the problem here.
master branch
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
loadAllResourceGroups(); // THIS IS ASYNC 1
add invoke
resourceGroupsMap.put(rgName, rg);
loadAllNamespaceResourceGroups(); // THIS IS ASYNC 2
will invoke
rgService.registerNameSpace(policy.resource_group_name, ns);
then
inside
if 2 run earlier than 1, it will occur error, if no namespace add/delete, it won't recover.
To Reproduce
review the code
Expected behavior
A clear and concise description of what you expected to happen.
maybe we need loadAllResourceGroups sync, or when it done, then loadAllNamespaceResourceGroups
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
master branch
The text was updated successfully, but these errors were encountered: