You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2022/02/25 08:07:18 UTC

[pulsar] branch branch-2.10 updated (e56d2fd -> 214d292)

This is an automated email from the ASF dual-hosted git repository.

penghui pushed a change to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git.


    from e56d2fd  Fix producerFuture not complete in ServerCnx#handleProducer (#14467)
     new 2bc736a  [Python Client] Fix ModuleNotFoundError is not defined in python2 (#14403)
     new d6c017e  Fix await condition error in testMultiTopicsConsumerImplPauseForPartitionNumberChange (#14405)
     new 214d292  fix error log miss stack trace when create tenant fail (#14366)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java    | 4 ++--
 .../java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java | 2 +-
 pulsar-client-cpp/python/pulsar/schema/schema_avro.py                 | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

[pulsar] 03/03: fix error log miss stack trace when create tenant fail (#14366)

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 214d292acfe502304aaa2e48e3cab6fe73025731
Author: WangJialing <65...@users.noreply.github.com>
AuthorDate: Mon Feb 21 22:22:59 2022 +0800

    fix error log miss stack trace when create tenant fail (#14366)
    
    ### Motivation
    
    When create tenant fail, the error log did not print out the stack trace.
    
    ### Verifying this change
    
    This change is a trivial rework / code cleanup without any test coverage.
    
    ### Documentation
    - [x] `no-need-doc`
    only a fix for error log
    
    (cherry picked from commit b829a4ce121268f55748bbdd6f19ac36129e7dab)
---
 .../main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
index 9b04830..4f1bad2 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
@@ -162,12 +162,12 @@ public class TenantsBase extends PulsarWebResource {
                     log.info("[{}] Created tenant {}", clientAppId(), tenant);
                     asyncResponse.resume(Response.noContent().build());
                 }).exceptionally(ex -> {
-                    log.error("[{}] Failed to create tenant {}", clientAppId, tenant, e);
+                    log.error("[{}] Failed to create tenant {}", clientAppId, tenant, ex);
                     asyncResponse.resume(new RestException(ex));
                     return null;
                 });
             }).exceptionally(ex -> {
-                log.error("[{}] Failed to create tenant {}", clientAppId(), tenant, e);
+                log.error("[{}] Failed to create tenant {}", clientAppId(), tenant, ex);
                 asyncResponse.resume(new RestException(ex));
                 return null;
             });

[pulsar] 02/03: Fix await condition error in testMultiTopicsConsumerImplPauseForPartitionNumberChange (#14405)

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit d6c017e6bf8b3e5d904d37419e345596884722a8
Author: JiangHaiting <ji...@apache.org>
AuthorDate: Wed Feb 23 13:11:46 2022 +0800

    Fix await condition error in testMultiTopicsConsumerImplPauseForPartitionNumberChange (#14405)
    
    (cherry picked from commit 22a0beb5d4dc4c57fede791194573535bc7b8b10)
---
 .../java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
index abcc61c..368652c 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
@@ -3223,7 +3223,7 @@ public class SimpleProducerConsumerTest extends ProducerConsumerBase {
         admin.topics().updatePartitionedTopic(topicName, 3);
 
         // 4. wait for client to update partitions
-        Awaitility.await().until(() -> ((MultiTopicsConsumerImpl) consumer).getConsumers().size() <= 1);
+        Awaitility.await().until(() -> ((MultiTopicsConsumerImpl) consumer).getConsumers().size() == 3);
 
         // 5. produce 5 more messages
         for (int i = 5; i < 10; i++) {

[pulsar] 01/03: [Python Client] Fix ModuleNotFoundError is not defined in python2 (#14403)

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 2bc736a1521c46b84fa64e279e98e399cbfd5cc0
Author: Lishen Yao <li...@streamnative.io>
AuthorDate: Tue Feb 22 13:09:57 2022 +0800

    [Python Client] Fix ModuleNotFoundError is not defined in python2 (#14403)
    
    Fixes #14193
    
    ### Motivation
    
    `ModuleNotFoundError` is a builtin since python3.6. If we use python2 version pulsar, python will raise `NameError: name 'ModuleNotFoundError' is not defined` error.
    
    ### Modifications
    
    Change `ModuleNotFoundError`  to `ImportError`
    
    (cherry picked from commit c4e29f3db4f122f2b3672850af3d05133badd9cf)
---
 pulsar-client-cpp/python/pulsar/schema/schema_avro.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulsar-client-cpp/python/pulsar/schema/schema_avro.py b/pulsar-client-cpp/python/pulsar/schema/schema_avro.py
index 5861505..05ceb8e 100644
--- a/pulsar-client-cpp/python/pulsar/schema/schema_avro.py
+++ b/pulsar-client-cpp/python/pulsar/schema/schema_avro.py
@@ -27,7 +27,7 @@ from .schema import Schema
 try:
     import fastavro
     HAS_AVRO = True
-except ModuleNotFoundError:
+except ImportError:
     HAS_AVRO = False
 
 if HAS_AVRO: