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 2020/07/16 06:48:36 UTC

[GitHub] [pulsar-manager] g0715158 opened a new pull request #321: When using the mysql database, any unload and split operations on the…

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


   … bundle will have a primary key conflict error
   
   
   *(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
   
   Fixes #<xyz>
   
   *(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*
   
   Master Issue: #<xyz>
   
   ### Motivation
   
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
   
   ### Modifications
   
   每次插入namespace是都先通过租户和namespace做一次存在校验
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the `./gradlew build` checks.
           NamespaceEntity entity = namespacesMapper.findByTenantNamespace(namespacesEntity.getTenant(),namespacesEntity.getNamespace());
           if (entity!=null){
               return 0;
           }
   
   


----------------------------------------------------------------
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 #321: When using the mysql database, any unload and split operations on the…

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



##########
File path: src/main/java/org/apache/pulsar/manager/dao/NamespacesRepositoryImpl.java
##########
@@ -99,6 +99,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:
       You can try to format the code style:
   
   ```
   NamespaceEntity entity = namespacesMapper.findByTenantNamespace(namespacesEntity.getTenant(), namespacesEntity.getNamespace());
   if (entity != null) {
         return 0;
    }
   ```




----------------------------------------------------------------
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 closed pull request #321: When using the mysql database, any unload and split operations on the…

Posted by GitBox <gi...@apache.org>.
g0715158 closed pull request #321:
URL: https://github.com/apache/pulsar-manager/pull/321


   


-- 
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 #321: When using the mysql database, any unload and split operations on the…

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



##########
File path: src/main/java/org/apache/pulsar/manager/dao/NamespacesRepositoryImpl.java
##########
@@ -99,6 +99,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:
       You can try to format the code style:
   
   ```
   NamespaceEntity entity = namespacesMapper.findByTenantNamespace(namespacesEntity.getTenant(), namespacesEntity.getNamespace());
   if (entity != null) {
        return 0;
   }
   ```




----------------------------------------------------------------
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 pull request #321: When using the mysql database, any unload and split operations on the…

Posted by GitBox <gi...@apache.org>.
g0715158 commented on pull request #321:
URL: https://github.com/apache/pulsar-manager/pull/321#issuecomment-848375971


   This problem has been solved by other pull Request


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