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 2021/09/19 00:31:12 UTC

[pulsar] branch branch-2.8 updated (4cc0821 -> dd8aeaf)

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

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


    from 4cc0821  Fix wrong key-hash selector used for new consumers after all the previous consumers disconnected (#12035)
     new 963c142  Avoid adding duplicated BrokerEntryMetadata (#12018)
     new dd8aeaf  Remove python3 from vcpkg.json (#12092)

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:
 .../apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java    | 12 +++++-------
 pulsar-client-cpp/vcpkg.json                                 |  1 -
 2 files changed, 5 insertions(+), 8 deletions(-)

[pulsar] 01/02: Avoid adding duplicated BrokerEntryMetadata (#12018)

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.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 963c1426ae8a1f62be4ba1f975dd42edb5cf2b3e
Author: Yunze Xu <xy...@163.com>
AuthorDate: Sat Sep 18 20:43:02 2021 +0800

    Avoid adding duplicated BrokerEntryMetadata (#12018)
    
    ### Motivation
    
    When the Pulsar cluster enables broker entry metadata, sometimes there're some corrupted entries. See https://github.com/streamnative/kop/issues/442 for example. It's because the broker entry metadata has been added twice.
    
    This bug might be introduced from https://github.com/apache/pulsar/pull/9039 https://github.com/apache/pulsar/blob/9b7c3275c904ac1e6a8ef67487a10a0506bb2c58/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L1516-L1518
    
    It happened during a managed ledger's rollover while there're some pending `OpAddEntry`s in `updateLedgersIdsComplete`, only the ledger id should be updated and the data of `OpAddEntry` should not be modified.
    
    ### Modifications
    
    Only call `beforeAddEntry` for once at the beginning of `internalAsyncAddEntry`.
    
    (cherry picked from commit 9d44617a204f4aba4453659f76aded804a04cf6d)
---
 .../apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java    | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
index 5892194..2a7f659 100644
--- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
+++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
@@ -717,6 +717,9 @@ public class ManagedLedgerImpl implements ManagedLedger, CreateCallback {
     }
 
     private synchronized void internalAsyncAddEntry(OpAddEntry addOperation) {
+        if (!beforeAddEntry(addOperation)) {
+            return;
+        }
         pendingAddEntries.add(addOperation);
         final State state = STATE_UPDATER.get(this);
         if (state == State.Fenced) {
@@ -779,10 +782,7 @@ public class ManagedLedgerImpl implements ManagedLedger, CreateCallback {
                 addOperation.setCloseWhenDone(true);
                 STATE_UPDATER.set(this, State.ClosingLedger);
             }
-            // interceptor entry before add to bookie
-            if (beforeAddEntry(addOperation)) {
-                addOperation.initiate();
-            }
+            addOperation.initiate();
         }
     }
 
@@ -1513,9 +1513,7 @@ public class ManagedLedgerImpl implements ManagedLedger, CreateCallback {
                     ReferenceCountUtil.release(existsOp.data);
                 }
                 existsOp.setLedger(currentLedger);
-                if (beforeAddEntry(existsOp)) {
-                    pendingAddEntries.add(existsOp);
-                }
+                pendingAddEntries.add(existsOp);
             }
         } while (existsOp != null && --pendingSize > 0);
 

[pulsar] 02/02: Remove python3 from vcpkg.json (#12092)

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.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit dd8aeafda05f573c780eccbfa38c69456f7a5f25
Author: Yunze Xu <xy...@163.com>
AuthorDate: Sun Sep 19 08:28:14 2021 +0800

    Remove python3 from vcpkg.json (#12092)
    
    ### Motivation
    
    The master CI is broken by the Windows C++ build if the C++ related code was changed. See https://github.com/apache/pulsar/pull/12076/checks?check_run_id=3639836198 for example.
    
    It's because there's a bug in latest vcpkg for python3 build. See https://github.com/microsoft/vcpkg/issues/20242.
    
    ### Modifications
    
    Remove the python3 dependency from vcpkg.json. Since the CI doesn't build Python wrapper, it won't affect the build.
    
    (cherry picked from commit fccc1cf60467bc0600c6507271cff85146d9f9e8)
---
 pulsar-client-cpp/vcpkg.json | 1 -
 1 file changed, 1 deletion(-)

diff --git a/pulsar-client-cpp/vcpkg.json b/pulsar-client-cpp/vcpkg.json
index fab37aa..735507e 100644
--- a/pulsar-client-cpp/vcpkg.json
+++ b/pulsar-client-cpp/vcpkg.json
@@ -21,7 +21,6 @@
     "snappy",
     "zlib",
     "zstd",
-    "python3",
     "log4cxx",
     {
       "name": "dlfcn-win32",