You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/20 09:33:08 UTC

[GitHub] [pulsar-manager] g0715158 opened a new pull request #386: fix unload namespace error

g0715158 opened a new pull request #386:
URL: https://github.com/apache/pulsar-manager/pull/386


   *(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
   
   Fixes #385
   
   *(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*
   
   Master Issue: #385
   
   *Describe the modifications you've done.*
   
   When the unload operation of the bundles is executed, the background keeps reporting that the primary key conflict inserted into the NameSpace database is abnormal.
   
    ase add `Fixes #<xyz>`.)*
   
   Fixes #385
   
   *(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*
   
   Master Issue: #385
   
   *Describe the modifications you've done.*
   
   Perform a check for existence before the namespace is inserted, if it exists, no more insertion is performed
   
    
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] tuteng commented on a change in pull request #386: fix unload namespace error

Posted by GitBox <gi...@apache.org>.
tuteng commented on a change in pull request #386:
URL: https://github.com/apache/pulsar-manager/pull/386#discussion_r637780066



##########
File path: src/main/java/org/apache/pulsar/manager/dao/NamespacesRepositoryImpl.java
##########
@@ -105,6 +105,10 @@ public void remove(String tenant, String namespace) {
 
     @Override
     public long save(NamespaceEntity namespacesEntity) {
+        NamespaceEntity entity = namespacesMapper.findByTenantNamespace(namespacesEntity.getTenant(),namespacesEntity.getNamespace());
+        if (entity!=null){

Review comment:
       Try format code:
   
   ```
   NamespaceEntity entity = namespacesMapper.findByTenantNamespace(namespacesEntity.getTenant(), namespacesEntity.getNamespace());
   if (entity != null) {
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] g0715158 commented on a change in pull request #386: fix unload namespace error

Posted by GitBox <gi...@apache.org>.
g0715158 commented on a change in pull request #386:
URL: https://github.com/apache/pulsar-manager/pull/386#discussion_r637798795



##########
File path: src/main/java/org/apache/pulsar/manager/dao/NamespacesRepositoryImpl.java
##########
@@ -105,6 +105,10 @@ public void remove(String tenant, String namespace) {
 
     @Override
     public long save(NamespaceEntity namespacesEntity) {
+        NamespaceEntity entity = namespacesMapper.findByTenantNamespace(namespacesEntity.getTenant(),namespacesEntity.getNamespace());
+        if (entity!=null){

Review comment:
       Already resolved




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] tuteng merged pull request #386: fix unload namespace error

Posted by GitBox <gi...@apache.org>.
tuteng merged pull request #386:
URL: https://github.com/apache/pulsar-manager/pull/386


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-manager] tuteng commented on a change in pull request #386: fix unload namespace error

Posted by GitBox <gi...@apache.org>.
tuteng commented on a change in pull request #386:
URL: https://github.com/apache/pulsar-manager/pull/386#discussion_r637780066



##########
File path: src/main/java/org/apache/pulsar/manager/dao/NamespacesRepositoryImpl.java
##########
@@ -105,6 +105,10 @@ public void remove(String tenant, String namespace) {
 
     @Override
     public long save(NamespaceEntity namespacesEntity) {
+        NamespaceEntity entity = namespacesMapper.findByTenantNamespace(namespacesEntity.getTenant(),namespacesEntity.getNamespace());
+        if (entity!=null){

Review comment:
       Try format code:
   
   ```
   if (entity != null)
   ```

##########
File path: src/main/java/org/apache/pulsar/manager/dao/NamespacesRepositoryImpl.java
##########
@@ -105,6 +105,10 @@ public void remove(String tenant, String namespace) {
 
     @Override
     public long save(NamespaceEntity namespacesEntity) {
+        NamespaceEntity entity = namespacesMapper.findByTenantNamespace(namespacesEntity.getTenant(),namespacesEntity.getNamespace());
+        if (entity!=null){

Review comment:
       Try format code:
   
   ```
   if (entity != null) {
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org