You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ji...@apache.org on 2022/09/04 13:27:41 UTC

[pulsar] branch branch-2.10 updated (7be144f51b5 -> a0cdf3faaa8)

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

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


    from 7be144f51b5 [fix][flay-test]BrokerInterceptorTest.testProducerCreation (#17159)
     new 4c6417ab7e1 [fix][flaky-test] Fix flaky test testBacklogNoDelayedForPartitionedTopic (#17180)
     new a0cdf3faaa8 [fix][tool] Using int instead of long in python scriptsc (#17215)

The 2 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:
 bin/pulsar-managed-ledger-admin                              |  4 ++--
 .../java/org/apache/pulsar/broker/admin/AdminApi2Test.java   | 12 +++++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)


[pulsar] 01/02: [fix][flaky-test] Fix flaky test testBacklogNoDelayedForPartitionedTopic (#17180)

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

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

commit 4c6417ab7e18fad181e47ffd714c0bf60a183579
Author: gaozhangmin <zh...@apache.org>
AuthorDate: Sun Aug 21 10:01:22 2022 +0800

    [fix][flaky-test] Fix flaky test testBacklogNoDelayedForPartitionedTopic (#17180)
    
    (cherry picked from commit 1faf497ce29ca573ebf354396cf73691b27d5fc3)
---
 .../java/org/apache/pulsar/broker/admin/AdminApi2Test.java   | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java
index af518a36b31..62aed23ea4c 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java
@@ -1653,11 +1653,13 @@ public class AdminApi2Test extends MockedPulsarServiceBaseTest {
                 producer.send("message-1".getBytes(StandardCharsets.UTF_8));
             }
         }
-
-        TopicStats topicStats = admin.topics().getPartitionedStats(topic, false, true, true);
-        assertEquals(topicStats.getSubscriptions().get(subName).getMsgBacklog(), 10);
-        assertEquals(topicStats.getSubscriptions().get(subName).getBacklogSize(), 440);
-        assertEquals(topicStats.getSubscriptions().get(subName).getMsgBacklogNoDelayed(), 5);
+        // wait until the message add to delay queue.
+        Awaitility.await().untilAsserted(() -> {
+            TopicStats topicStats = admin.topics().getPartitionedStats(topic, false, true, true);
+            assertEquals(topicStats.getSubscriptions().get(subName).getMsgBacklog(), 10);
+            assertEquals(topicStats.getSubscriptions().get(subName).getBacklogSize(), 440);
+            assertEquals(topicStats.getSubscriptions().get(subName).getMsgBacklogNoDelayed(), 5);
+        });
 
         for (int i = 0; i < 5; i++) {
             consumer.acknowledge(consumer.receive());


[pulsar] 02/02: [fix][tool] Using int instead of long in python scriptsc (#17215)

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

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

commit a0cdf3faaa8a4150d2ffab998337dcd11abcf8be
Author: Yong Zhang <zh...@gmail.com>
AuthorDate: Tue Aug 23 18:57:17 2022 +0800

    [fix][tool] Using int instead of long in python scriptsc (#17215)
    
    (cherry picked from commit 8286e8ccb2e1433814c306607c6f218ca548752a)
---
 bin/pulsar-managed-ledger-admin | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/pulsar-managed-ledger-admin b/bin/pulsar-managed-ledger-admin
index 9ed5d69bb13..dce85ce3246 100755
--- a/bin/pulsar-managed-ledger-admin
+++ b/bin/pulsar-managed-ledger-admin
@@ -244,7 +244,7 @@ def deleteMLLedgerIdsCommand(zk, mlPath, deleteLedgerIds):
             deletLedgerIds = set(deleteLedgerIds.split(","))
             deletLedgerIdSet = set()
             for id in deletLedgerIds:
-                deletLedgerIdSet.add(long(id))
+                deletLedgerIdSet.add(int(id))
             deleteLedgerIdsFromManagedLedgerInfo(zk, mlPath, deletLedgerIdSet)
         else:
             print('Usage: --command {} [--ledgerIds]'.format(deleteMlLedgerIds))
@@ -274,7 +274,7 @@ def updateMarkDeleteOfCursorCommand(zk, mlPath, cursorName, markDeletePosition):
             if markDeletePosition:
                 positionPair = markDeletePosition.split(":")
                 if len(positionPair) == 2:
-                    updateCursorMarkDelete(zk, mlPath + "/" + cursorName, (long(positionPair[0])), long(positionPair[1]))
+                    updateCursorMarkDelete(zk, mlPath + "/" + cursorName, (int(positionPair[0])), int(positionPair[1]))
                 else:
                     print("markDeletePosition must be in format <ledger_id>:<entry_id>")
             else: