Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Bump pulsar version to 2.10.4-SNAPSHOT #5860

Closed
wants to merge 1,009 commits into from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jan 28, 2023

  1. [fix] [ml] Topics stats shows msgBacklog but there reality no backlog (

    …apache#19275)
    
    ### Motivation
    
    #### 1. `readPosition` point to a deleted ledger
    
    When `trim ledgers` and `create new cursor` are executed concurrently, it will cause the `readPosition` of the cursor to point to a deleted ledger.
    
    | time | `trim ledgers` | `create new cursor` |
    | --- | --- | --- |
    | 1 | | set read position and mark deleted position |
    | 2 | delete ledger | |
    | 3 | | add the cursor to `ManagedLedger.cursors` |
    
    ----
    
    #### 2. Backlog wrong caused by `readPosition` wrong
    <strong>(Highlight)</strong>Since the read position of the cursor is pointing at a deleted ledger, so deleted messages will never be consumed or acknowledged. Since the backlog in the API `topics stats` response is calculated as this: `managedLedger.entriesAddedCounter - cursor.messagesConsumedCounter`, the result is: Topics stats show `msgBacklog` but there is reality no backlog.
    - `managedLedger.entriesAddedCounter`: Pulsar will set it to `0` when creating a new managed ledger, it will increment when adding entries.
    - `cursor.messagesConsumedCounter`: Pulsar will set it to `0` when creating a new cursor, it will increment when acknowledging.
    
    For example:
    - write entries to the managed ledger: `{1:0~1:9}...{5:0~5:9}`
      - `managedLedger.entriesAddedCounter` is `50` now
    - create a new cursor, and set the read position to `1:0`
      -  `cursor.messagesConsumedCounter` is `0` now
    - delete ledgers `1~4`
    - consume all messages
      - can only consume the messages {5:0~5:9}, so `cursor.messagesConsumedCounter` is `10` now
    - the `backlog` in response of `topics stats` is `50 - 10 = 40`, but there reality no backlog
    
    ----
    
    #### 3. Reproduce issue
    Sorry, I spent 4 hours trying to write a non-invasive test, but failed. <strong>(Highlight)</strong>You can reproduce by `testBacklogIfCursorCreateConcurrentWithTrimLedger` in the PR apache#19274
    
    https://github.com/apache/pulsar/blob/a2cdc759fc2710e4dd913eb0485d23ebcaa076a4/pulsar-broker/src/test/java/org/apache/bookkeeper/mledger/impl/StatsBackLogTest.java#L163
    
    ### Modifications
    
    Avoid the race condition of `cursor.initializeCursorPosition` and `internalTrimLedgers`
    
    (cherry picked from commit 4139fef)
    poorbarcode authored and codelipenghui committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    725b82c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    74f40c9 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2023

  1. [fix][cli][branch-2.10] Fix mbeans to json (apache#19294)

    Signed-off-by: Zixuan Liu <nodeces@gmail.com>
    nodece committed Jan 29, 2023
    Configuration menu
    Copy the full SHA
    7b9a78e View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. [improve][broker] Replaced checkBackloggedCursors with checkBacklogge…

    …dCursor(single subscription check) upon subscription (apache#19343)
    heesung-sn authored and merlimat committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    6b067a5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0a8a4d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0dfbc61 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. [fix][client] Prevent DNS reverse lookup when physical address is an …

    …IP address (apache#19028)
    
    (cherry picked from commit d8569cd)
    lhotari authored and michaeljmarshall committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    5385f3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d5244c7 View commit details
    Browse the repository at this point in the history
  3. [fix][proxy] Only go to connecting state once (apache#19331)

    Relates to: apache#17831 (comment)
    
    ### Motivation
    
    When the `ProxyConnection` handles a `Connect` command, that is the time to go to `Connecting` state. There is no other time that makes sense to switch to connecting. The current logic will go to connecting in certain re-authentication scenarios, but those are incorrect. By moving the state change to earlier in the logic, we make the state transition clearer and prevent corrupted state.
    
    ### Modifications
    
    * Remove `state = State.Connecting` from the `doAuthentication` method, which is called multiple times for various reasons
    * Add `state = State.Connecting` to the start of the `handleConnect` method.
    
    ### Verifying this change
    
    The existing tests will verify this change, and reading through the code makes it clear this is a correct change.
    
    ### Does this pull request potentially affect one of the following parts:
    
    Not a breaking change.
    
    ### Documentation
    
    - [x] `doc-not-needed`
    
    It would be nice to map out the state transitions for our connection classes. That is our of the scope of this small improvement.
    
    ### Matching PR in forked repository
    
    PR in forked repository: michaeljmarshall#21
    
    (cherry picked from commit c8650ce)
    michaeljmarshall committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    f9e24f2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fd700da View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2023

  1. Configuration menu
    Copy the full SHA
    4dca93b View commit details
    Browse the repository at this point in the history
  2. [fix][broker]optimize the shutdown sequence of broker service when it…

    … close (apache#16756)
    
    (cherry picked from commit 14912a6)
    HQebupt authored and liangyepianzhou committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    a28ee0e View commit details
    Browse the repository at this point in the history
  3. [fix][broker] Pass subscriptionName to auth service (apache#17123) (a…

    …pache#19423)
    
    Co-authored-by: Michael Marshall <mmarshall@apache.org>
    
    ### Motivation
    
    Cherry-pick apache#17123
    
    ### Verifying this change
    
    - [ ] Make sure that the change passes the CI checks.
    
    *(Please pick either of the following options)*
    
    This change is a trivial rework / code cleanup without any test coverage.
    
    *(or)*
    
    This change is already covered by existing tests, such as *(please describe tests)*.
    
    *(or)*
    
    This change added tests and can be verified as follows:
    
    *(example:)*
      - *Added integration tests for end-to-end deployment with large payloads (10MB)*
      - *Extended integration test for recovery after broker failure*
    
    ### Does this pull request potentially affect one of the following parts:
    
    <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
    
    *If the box was checked, please highlight the changes*
    
    - [ ] Dependencies (add or upgrade a dependency)
    - [ ] The public API
    - [ ] The schema
    - [ ] The default values of configurations
    - [ ] The threading model
    - [ ] The binary protocol
    - [ ] The REST endpoints
    - [ ] The admin CLI options
    - [ ] The metrics
    - [ ] Anything that affects deployment
    
    ### Documentation
    
    <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
    
    - [ ] `doc` <!-- Your PR contains doc changes. -->
    - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
    - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
    - [ ] `doc-complete` <!-- Docs have been already added -->
    
    ### Matching PR in forked repository
    
    PR in forked repository: <!-- ENTER URL HERE -->
    
    <!--
    After opening this PR, the build in apache/pulsar will fail and instructions will
    be provided for opening a PR in the PR author's forked repository.
    
    apache/pulsar pull requests should be first tested in your own fork since the 
    apache/pulsar CI based on GitHub Actions has constrained resources and quota.
    GitHub Actions provides separate quota for pull requests that are executed in 
    a forked repository.
    
    The tests will be run in the forked repository until all PR review comments have
    been handled, the tests pass and the PR is approved by a reviewer.
    -->
    liangyepianzhou committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    503457b View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. [fix][txn] Correct the prompt message (apache#17009)

    Co-authored-by: fengwenzhi <fengwenzhi.max@bigo.sg>
    (cherry picked from commit 41edd2e)
    thetumbled authored and liangyepianzhou committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    45678b8 View commit details
    Browse the repository at this point in the history
  2. [fix][broker]fix multi invocation for ledger createComplete (apache#1…

    …8975)
    
    ### Motivation
    
    fix multi invocation for ledger `createComplete`
    
    ### Modifications
    
    Only call `createComplete` at the point of creating ledger timeout if the ledger is not created normally
    
    (cherry picked from commit 8f1c1b1)
    aloyszhang authored and liangyepianzhou committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    b83214e View commit details
    Browse the repository at this point in the history
  3. [fix][misc] do not require encryption on system topics (apache#18898)

    (cherry picked from commit 4129583)
    nicoloboschi authored and liangyepianzhou committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    0c2e526 View commit details
    Browse the repository at this point in the history
  4. [fix] [broker] getLastMessageId returns a wrong batch index of last m…

    …essage if enabled read compacted (apache#18877)
    
    ### Motivation
    
    The method `consumer.getLastMessageId` will return the latest message which can be received.
    - If disabled `read compacted`, will return the last confirmed position of `ManagedLedger`.
    - If enabled `read compacted`, will return the latest message id which can be read from the compacted topic.
    
    If we send a batch message like this:
    
    ```java
    producer.newMessage().key("k1").value("v0").sendAsync(); // message-id is [3:1,-1:0]
    producer.newMessage().key("k1").value("v1").sendAsync(); // message-id is [3:1,-1:1]
    producer.newMessage().key("k1").value("v2").sendAsync(); // message-id is [3:1,-1:2]
    producer.newMessage().key("k2").value("v0").sendAsync(); // message-id is [3:1,-1:3]
    producer.newMessage().key("k2").value("v1").sendAsync(); // message-id is [3:1,-1:4]
    producer.newMessage().key("k2").value(null).sendAsync(); // message-id is [3:1,-1:5]
    producer.flush();
    ```
    
    After the compaction task is done, the messages with key `k2` will be deleted by the compaction task. Then the latest message that can be received will be `[3:1:-1:2]`.
    
    ---
    When we call `consumer.getLastMessageId`, the expected result is:
    
    ```
    [3:1,-1:2]
    ```
    
    ---
    But the actual result is:
    
    ```
    [3:1,-1:5]
    ```
    
    ### Modifications
    If enabled `read compacted` and the latest entry of the compacted topic is a batched message, extract the entry and calculate all internal messages, then return the latest message which is not marked `compacted out`.
    
    (cherry picked from commit 83993ae)
    poorbarcode authored and liangyepianzhou committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    6e93fe4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fde620e View commit details
    Browse the repository at this point in the history
  6. [fix][broker] Support deleting partitioned topics with the keyword `-…

    …partition-` (apache#19230)
    
    (cherry picked from commit fc4bca6)
    mattisonchao authored and liangyepianzhou committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    0ade728 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2023

  1. Configuration menu
    Copy the full SHA
    80ab719 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f0e8e6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3677138 View commit details
    Browse the repository at this point in the history
  4. [improve][broker] Added isActive in ManagedCursorImpl (apache#19341)

    (cherry picked from commit 96fb7da)
    heesung-sn authored and liangyepianzhou committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    f61aafa View commit details
    Browse the repository at this point in the history
  5. [improve][broker] Added isActive in ManagedCursorImpl (apache#19341)

    (cherry picked from commit 96fb7da)
    heesung-sn authored and liangyepianzhou committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    d1e4008 View commit details
    Browse the repository at this point in the history
  6. [improve][broker] Copy subscription properties during updating the to…

    …pic partition number. (apache#19223)
    
    (cherry picked from commit 253e3e4)
    mattisonchao authored and liangyepianzhou committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    05cbbfd View commit details
    Browse the repository at this point in the history
  7. [fix][broker] Expect msgs after server initiated CloseProducer (apach…

    …e#19446)
    
    (cherry picked from commit 524288c)
    (cherry picked from commit 4cbe68e)
    michaeljmarshall committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    283f773 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. Configuration menu
    Copy the full SHA
    660ac36 View commit details
    Browse the repository at this point in the history
  2. [cherry-pick][branch-2.10] Close TransactionBuffer when create persis…

    …tent topic timeout (apache#19454)
    
    Co-authored-by: Tao Jiuming <95597048+tjiuming@users.noreply.github.com>
    liangyepianzhou and tjiuming committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    4a1ac0a View commit details
    Browse the repository at this point in the history
  3. [revert][misc] "modify check waitingForPingResponse with volatile (ap…

    …ache#12615)" (apache#19439)
    
    This reverts commit 62e2547.
    
    ### Motivation
    
    The motivation for apache#12615 relies on an incorrect understanding of Netty's threading model. The `ctx.executor()` is the context's event loop thread that is the same thread used to process messages. The `waitingForPingResponse` variable is only ever updated/read from the context's event loop, so there is no need to make the variable `volatile`.
    
    ### Modifications
    
    * Remove `volatile` keyword for `waitingForPingResponse`
    
    ### Verifying this change
    
    Read through all references to the variable.
    
    ### Documentation
    
    - [x] `doc-not-needed`
    
    ### Matching PR in forked repository
    
    PR in forked repository: Skipping for this trivial PR.
    
    (cherry picked from commit fb28d83)
    michaeljmarshall committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    f6da22b View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2023

  1. [fix][broker] Fix PulsarRegistrationClient and ZkRegistrationClient n…

    …ot aware rack info problem. (apache#18672)
    
    (cherry picked from commit 43335fb)
    horizonzy authored and liangyepianzhou committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    003c186 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58fb59f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    21fecf0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ddb94aa View commit details
    Browse the repository at this point in the history
  5. [fix][txn] fix txn coordinator recover handle committing and aborting…

    … txn race condition. (apache#19201)
    
    Fixes apache#19200
    
    transaction lasted for long time and will not be aborted, which cause TB's MaxReadPosition do not move and will not take snapshot. With an old snapshot, TB will read a lot of entry while doing recovery.
    In worst cases, there are 30 minutes of unavailable time with Topics.
    
    avoid concurrent execution.
    
    (cherry picked from commit 96f4161)
    thetumbled authored and liangyepianzhou committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    5dd13ec View commit details
    Browse the repository at this point in the history
  6. [cherry-pick][branch-2.10] Allow superusers to abort transactions (ap…

    …ache#19467) (apache#19473)
    
    Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
    liangyepianzhou and nicoloboschi committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    cb91c4a View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. Configuration menu
    Copy the full SHA
    4b83d06 View commit details
    Browse the repository at this point in the history
  2. [fix][broker] Remove timestamp from broker metrics (apache#17419)

    When a Pulsar topic is unloaded from a broker, certain metrics related to that topic will appear to remain active for the broker for 5 minutes. This is confusing for troubleshooting because it makes the topic appear to be owned by multiple brokers for a short period of time. See below for a way to reproduce this behavior.
    
    In order to solve this "zombie" metric problem, I propose we remove the timestamps that get exported with each Prometheus metric served by the broker.
    
    Since we introduced Prometheus metrics in #294, we have exported a timestamp along with most metrics. This is an optional, valid part of the spec defined [here](https://prometheus.io/docs/instrumenting/exposition_formats/#comments-help-text-and-type-information). However, after our adoption of Prometheus metrics, the Prometheus project released version 2.0 with a significant improvement to its concept of staleness. In short, before 2.0, a metric that was in the last scrape but not the next one (this often happens for topics that are unloaded) will essentially inherit the most recent value for the last 5 minute window. If there isn't one in the past 5 minutes, the metric becomes "stale" and isn't reported. Starting in 2.0, there was new logic to consider a value stale the very first time that it is not reported in a scrape. Importantly, this new behavior is only available if you do not export timestamps with metrics, as documented here: https://prometheus.io/docs/prometheus/latest/querying/basics/#staleness. We want to use the new behavior because it gives better insight into all topic metrics, which are subject to move between brokers at any time.
    
    This presentation https://www.youtube.com/watch?v=GcTzd2CLH7I and slide deck https://promcon.io/2017-munich/slides/staleness-in-prometheus-2-0.pdf document the feature in detail. This blog post was also helpful: https://www.robustperception.io/staleness-and-promql/.
    
    Additional motivation comes from mailing list threads like this one https://groups.google.com/g/prometheus-users/c/8OFAwp1OEcY. It says:
    
    > Note, however, that adding timestamps is an extremely niche use
    case. Most of the users who think the need it should actually not do
    it.
    >
    > The main usecases within that tiny niche are federation and mirroring
    the data from another monitoring system.
    
    The Prometheus Go client also indicates a similar motivation: https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#NewMetricWithTimestamp.
    
    The OpenMetrics project also recommends against exporting timestamps: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exposing-timestamps.
    
    As such, I think we are not a niche use case, and we should not add timestamps to our metrics.
    
    1. Run any 2.x version of Prometheus (I used 2.31.0) along with the following scrape config:
    ```yaml
      - job_name: broker
        honor_timestamps: true
        scrape_interval: 30s
        scrape_timeout: 10s
        metrics_path: /metrics
        scheme: http
        follow_redirects: true
        static_configs:
          - targets: ["localhost:8080"]
    ```
    2. Start pulsar standalone on the same machine. I used a recently compiled version of master.
    3. Publish messages to a topic.
    4. Observe `pulsar_in_messages_total` metric for the topic in the prometheus UI (localhost:9090)
    5. Stop the producer.
    6. Unload the topic from the broker.
    7. Optionally, `curl` the metrics endpoint to verify that the topic’s `pulsar_in_messages_total` metric is no longer reported.
    8. Watch the metrics get reported in prometheus for 5 additional minutes.
    
    When you set `honor_timestamps: false`, the metric stops getting reported right after the topic is unloaded, which is the desired behavior.
    
    * Remove all timestamps from metrics
    * Fix affected tests and test files (some of those tests were in the proxy and the function worker, but no code was changed for those modules)
    
    This change is accompanied by updated tests.
    
    This is technically a breaking change to the metrics, though I would consider it a bug fix at this point. I will discuss it on the mailing list to ensure it gets proper visibility.
    
    Given how frequently Pulsar changes which metrics are exposed between each scrape, I think this is an important fix that should be cherry picked to older release branches. Technically, we can avoid cherry picking this change if we advise users to set `honor_timestamps: false`. However, I think it is better to just remove them.
    
    - [x] `doc-not-needed`
    
    (cherry picked from commit 0bbc4e1)
    michaeljmarshall authored and liangyepianzhou committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    e59aac7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eabc2cd View commit details
    Browse the repository at this point in the history
  4. [fix][authorization] Fix the return value of canConsumeAsync (apache#…

    …19412)
    
    Signed-off-by: Zixuan Liu <nodeces@gmail.com>
    (cherry picked from commit 016e7f0)
    nodece authored and liangyepianzhou committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    b28d796 View commit details
    Browse the repository at this point in the history
  5. [fix][ml] Reset individualDeletedMessagesSerializedSize after acked a…

    …ll messages. (apache#19428)
    
    (cherry picked from commit c91303d)
    mattisonchao authored and liangyepianzhou committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    0c7b250 View commit details
    Browse the repository at this point in the history
  6. [fix][client] Fix async completion in ConsumerImpl#processPossibleToD…

    …LQ (apache#19392)
    
    (cherry picked from commit 39dd1cd)
    lhotari authored and liangyepianzhou committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    73f6693 View commit details
    Browse the repository at this point in the history
  7. [fix][fn] Fix k8s merge runtime opts bug (apache#19481)

    Fixes: apache#19478
    
    ### Motivation
    
    See issue for additional context. Essentially, we are doing a shallow clone when we needed a deep clone. The consequence is leaked labels, annotations, and tolerations.
    
    ### Modifications
    
    * Add a `deepClone` method to the `BasicKubernetesManifestCustomizer.RuntimeOpts` method. Note that this method is not technically a deep clone for the k8s objects. However, based on the way we "merge" these objects, it is sufficient to copy references to the objects.
    
    ### Verifying this change
    
    Added a test that fails before the change and passes afterwards.
    
    ### Documentation
    
    - [x] `doc-not-needed`
    
    This is an internal bug fix. No docs needed.
    
    ### Matching PR in forked repository
    
    PR in forked repository: michaeljmarshall#27
    
    (cherry picked from commit 0205148)
    michaeljmarshall committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    bb5fd03 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. [fix][broker] Make ServerCnx#originalAuthData volatile (apache#19507)

    Fixes apache#19431
    
    `authenticationData` is already `volatile`. We use `originalAuthData` when set, so we should match the style. In apache#19431, I proposed that we find a way to not use `volatile`. I still think this might be a "better" approach, but it will be a larger change, and since we already use `volatile` for `authenticationData`, I think this is the right change for now.
    
    It's possible that this is not a bug, given that the `originalAuthData` does not change frequently. However, we always want to use up to date values for authorization.
    
    * Add `volatile` keyword to `ServerCnx#originalAuthData`.
    
    This change is a trivial rework / code cleanup without any test coverage.
    
    - [x] `doc-not-needed`
    
    PR in forked repository: skipping test in fork.
    
    (cherry picked from commit c4c1744)
    (cherry picked from commit e1d9941)
    michaeljmarshall committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    0d69ead View commit details
    Browse the repository at this point in the history
  2. [cleanup][broker] Validate originalPrincipal earlier in ServerCnx (ap…

    …ache#19270)
    
    (cherry picked from commit fd3ce8b)
    (cherry picked from commit 2847dd1)
    michaeljmarshall committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    01bd986 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Configuration menu
    Copy the full SHA
    fb5477b View commit details
    Browse the repository at this point in the history
  2. [fix][broker] ServerCnx broken after recent cherry-picks (apache#19521)

    I broke all release branches when I cherry picked 2847dd1 to them. This change takes some of the underlying logic from apache#19409, without taking the async logic.
    
    * Make changes to `ServerCnx` to make tests pass
    
    Tests are currently failing, so passing tests will show that this solution is correct.
    
    - [x] `doc-not-needed`
    
    (cherry picked from commit 8246da2)
    (cherry picked from commit 15e4198)
    michaeljmarshall committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    6132b46 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. [fix][broker] Fix loadbalance score caculation problem (apache#19420)

    (cherry picked from commit 456d112)
    gaozhangmin authored and liangyepianzhou committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    b4b664c View commit details
    Browse the repository at this point in the history
  2. [fix] [ml] messagesConsumedCounter of NonDurableCursor was initialize…

    …d incorrectly (apache#19355)
    
    (cherry picked from commit fc9e8bf)
    poorbarcode authored and liangyepianzhou committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    019c920 View commit details
    Browse the repository at this point in the history
  3. [fix][broker][branch-2.10] Replace sync method call in async call cha…

    …in to prevent ZK event thread deadlock (apache#19539)
    lhotari committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    b970f02 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. [improve][broker] Require authRole is proxyRole to set originalPrinci…

    …pal (apache#19455)
    
    Co-authored-by: Lari Hotari <lhotari@apache.org>
    (cherry picked from commit aa63a55)
    michaeljmarshall committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    6a599af View commit details
    Browse the repository at this point in the history
  2. [improve][broker] ServerCnx: go to Failed state when auth fails (apac…

    …he#19312)
    
    PIP: apache#12105
    
    When authentication fails in the `ServerCnx`, the state is left in `Start` if the primary `authData` fails authentication and in `Connecting` or `Connected` if the `originalAuthData` authentication fails. To prevent any kind of unexpected behavior, we should go to `Failed` state.
    
    Note that the tests verify the current behavior where a failed `originalAuthData` results first in a `Connected` command from the broker and then an `Error` command. I documented that I think this is sub optimal here apache#19311.
    
    * Update `ServerCnx` state to `Failed` when there is an authentication exception during `handleConnect` and during `handleAuthResponse`.
    * Update `handleAuthResponse` reply to `"Unable to authenticate"` instead of the `AuthenticationState` exception.
    
    A new test is added. The added test covers the change made in apache#19295 where we updated `ServerCnx` so that we call `AuthState#authenticate` instead of relying on the implementation detail that the initialization calls `authenticate`. That PR should have added a test.
    
    This is not a breaking change.
    
    - [x] `doc-not-needed`
    
    PR in forked repository: michaeljmarshall#18
    
    (cherry picked from commit 8049690)
    (cherry picked from commit 3ef3bf1)
    michaeljmarshall committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    467cd32 View commit details
    Browse the repository at this point in the history
  3. [feat][broker] Cherry-pick tests from (apache#19409)

    (cherry picked from commit 2225361)
    michaeljmarshall committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    557b72d View commit details
    Browse the repository at this point in the history
  4. [improve][broker] Add test to verify authRole cannot change (apache#1…

    …9430)
    
    (cherry picked from commit aa7af10)
    (cherry picked from commit c0f38a0)
    michaeljmarshall committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    0231ad3 View commit details
    Browse the repository at this point in the history
  5. [fix][broker] Call originalAuthState.authenticate in ServerCnx

    This change was introduced by apache#19295.
    
    That PR had more changes than are worth cherry-picking, though, so this
    commit only has the additional call to authenticate the original auth data.
    As a result, this commit is slightly less efficient because in some
    implementations, the authdata will be validated twice.
    
    (cherry picked from commit f9727ca)
    michaeljmarshall committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    1935f07 View commit details
    Browse the repository at this point in the history
  6. [fix][broker] Correct MockAlwaysExpiredAuthenticationState test impl

    In c0f38a0, we cherry picked a commit that relied on
    a feature not yet implemented in this branch. This commit fixes what that commit
    broke.
    
    (cherry picked from commit 547dee2)
    michaeljmarshall committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    09f00ee View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2023

  1. [branch-2.10][fix][proxy] Fix using wrong client version in pulsar pr…

    …oxy (apache#19576)
    
    ### Motivation
    
    Cherry pick apache#19540 to branch 2.11
    RobertIndie committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    cac4915 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2023

  1. [fix][test] ProxyWithAuthorizationTest remove SAN from test certs (ap…

    …ache#19594)
    
    (cherry picked from commit f292bad)
    (cherry picked from commit 6576231)
    michaeljmarshall committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    14152fc View commit details
    Browse the repository at this point in the history
  2. [fix][broker] Make authentication refresh threadsafe (apache#19506)

    Co-authored-by: Lari Hotari <lhotari@users.noreply.github.com>
    (cherry picked from commit 153e4d4)
    (cherry picked from commit 161ec5a)
    michaeljmarshall committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    26e1053 View commit details
    Browse the repository at this point in the history
  3. [fix][broker] Allow proxy to pass same role for authRole and original…

    …Role (apache#19557)
    
    I broke the Pulsar Proxy with apache#19455 because that PR requires that when `X-Original-Principal` is supplied, the auth role must be a proxy role. This is not always the case for proxied admin requests. This PR seeks to fix that incorrect assumption by changing the way verification is done for the roles. Specifically, when the two roles are the same and they are not a proxy role, we will consider it a valid combination.
    
    Note that there is no inefficiency in this solution because When the `authenticatedPrincipal` is not a proxy role, that is the only role that is authenticated. Note also that we do not let the binary protocol authenticate this way, and that is consistent with the way the pulsar proxy forwards authentication data.
    
    Currently, we do the following when authentication is enabled in the proxy:
    
    1. Authenticate the client's http request and put the resulting role in the `X-Original-Principal` header for the call to the broker.
    https://github.com/apache/pulsar/blob/38555851359f9cfc172650c387a58c5a03809e97/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java#L370-L373
    
    2. Copy the `Authorization` header into the broker's http request:
    https://github.com/apache/pulsar/blob/38555851359f9cfc172650c387a58c5a03809e97/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java#L232-L236
    
    3. Configure the proxy's http client to use client TLS authentication (when configured):
    https://github.com/apache/pulsar/blob/38555851359f9cfc172650c387a58c5a03809e97/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java#L269-L277
    
    The problem with apache#19455 is that it assumes the proxy supplies its own authentication data. However, that only happens when using TLS authentication. Otherwise, the proxy forwards the client's authentication data in the `Authorization` header. As such, calls will fail because the `X-Original-Principal` header supplied without using a proxy role.
    
    * Consider the `authenticatedPrincipal` and the `originalPrincipal` a valid pair when they are equal and are not a `proxyRole` for http requests.
    
    I initially proposed that we only add the `X-Original-Principal` when we are using the proxy's authentication (see the first commit). I decided this solution is not ideal because it doesn't solve the problem, it doesn't make the brokers backwards compatible, and there isn't actually any inefficiency in passing the role as a header.
    
    When cherry-picking apache#19455 to branch-2.9, I discovered that `PackagesOpsWithAuthTest#testPackagesOps` was consistently failing because of the way the proxy supplies authentication data when proxying http requests. That test was removed by apache#12771, which explains why I didn't catch the error sooner. This PR includes a test that fails  without this change.
    
    Note that the primary issue must be that we didn't have any tests doing authentication forwarding through the proxy. Now we will have both relevant tests where the proxy is and is not authenticating.
    
    This is not a breaking change.
    
    - [x] `doc-required`
    
    PR in forked repository: michaeljmarshall#31
    
    (cherry picked from commit d4be954)
    (cherry picked from commit 5f5551d)
    michaeljmarshall committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    4da2487 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2023

  1. [fix][client] Broker address resolution wrong if connect through a mu…

    …lti-dns names proxy (apache#19597)
    
    (cherry picked from commit e286339)
    (cherry picked from commit 14b070b)
    nicoloboschi committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    27f0449 View commit details
    Browse the repository at this point in the history
  2. [fix][broker] Copy command fields and fix potential thread-safety in …

    …ServerCnx (apache#19517)
    
    (cherry picked from commit 0bb0f6b)
    nicoloboschi committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    36582d8 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2023

  1. [fix][broker][branch-2.10] Fix geo-replication admin (apache#19608)

    Signed-off-by: Zixuan Liu <nodeces@gmail.com>
    nodece committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    90980da View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2023

  1. [fix][admin] Fix validatePersistencePolicies that Namespace/Topic p…

    …ersistent policies cannot set to < 0 (apache#18999)
    
    (cherry picked from commit 4cae20c)
    tjiuming authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    67d2c29 View commit details
    Browse the repository at this point in the history
  2. [fix][broker] PulsarRegistrationClient - implement getAllBookies and …

    …follow BookieServiceInfo updates (apache#18133)
    
    * [fix] PulsarRegistrationClient - implement getAllBookies and follow BookieServiceInfo updates
    
    * remove debug
    
    (cherry picked from commit 0c326c0)
    eolivelli authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    a49b8e9 View commit details
    Browse the repository at this point in the history
  3. [Improve][Broker]Reduce GetReplicatedSubscriptionStatus local REST ca…

    …ll (apache#16946)
    
    (cherry picked from commit 046068a)
    AnonHxy authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    830ae26 View commit details
    Browse the repository at this point in the history
  4. [fix] [broker] Incorrect service name selection logic (apache#19505)

    When calling the method `PulsarWebResource.getRedirectionUrl`, reuse the same `PulsarServiceNameResolver` instance.
    
    (cherry picked from commit f9af424)
    poorbarcode authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    d0cff5f View commit details
    Browse the repository at this point in the history
  5. [improve][broker] Use shrink map for trackerCache (apache#19534)

    Signed-off-by: xiaolongran <xiaolongran@tencent.com>
    (cherry picked from commit c0f89dc)
    wolfstudy authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    0f455e6 View commit details
    Browse the repository at this point in the history
  6. [fix][client] Fix authentication not update after changing the servic…

    …eUrl (apache#19510)
    
    (cherry picked from commit 0f025f3)
    hangc0276 authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    132abe9 View commit details
    Browse the repository at this point in the history
  7. [feature][txn] Fix individual ack batch message with transaction abor…

    …t redevlier duplicate messages (apache#14327)
    
    If individual ack batch message with transaction and abort this transaction, we will redeliver this message. but this batch message some bit sit are acked by another transaction and re consume this bit sit will produce `TransactionConflictException`, we don't need to redeliver this bit sit witch is acked by another transaction.
    
    if batch have batch size 5
    
    1. txn1 ack 0, 1     the ackSet is   00111
    2. txn2 ack 2 3 4 the ack Set is  11000
    3. abort txn2 redeliver this position is 00111
    4. but now we don't filter txn1 ackSet so redeliver this position bitSet is 111111
    When filter the message we should filter the bit sit witch is real ack or in pendingAck state
    add the test
    
    (cherry picked from commit e0c0d5e)
    congbobo184 authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    90b4f86 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cf06952 View commit details
    Browse the repository at this point in the history
  9. [fix][client] Set authentication when using loadConf in client and ad…

    …min client (apache#18358)
    
    (cherry picked from commit 0f72a82)
    onobc authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    9160ee6 View commit details
    Browse the repository at this point in the history
  10. [cleanup][broker] Simplify extract entryMetadata code in filterEntrie…

    …sForConsumer (apache#18729)
    
    origin extract entry metadata logic is based on `Optional.map.orElseGet` which can be simplified by if condition and also has better performance on hot code path.
    
    1. use if null check replace Optional code.
    2. remove duplicate hasChunk check logic in `PersistentDispatcherMultipleConsumers.trySendMessagesToConsumers`
    
    (cherry picked from commit a1e3b80)
    lifepuzzlefun authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    e4a1e67 View commit details
    Browse the repository at this point in the history
  11. [improve][broker] Follow up apache#19230 to tighten the validation sc…

    …ope (apache#19234)
    
    This PR is following up apache#19230
    
    As @yuruguo mentioned apache#19230 (comment), we can tighten the validation scope.
    
    I've checked the logic and found we have no way to create the partition topic with the `-partition-{index}` template. So we can righten the validation scope.
    
    I will keep working on the partition topic section and try to clarify the concept and logic. Plus, ensuring compatibility.
    
    - tighten the validation scope
    
    (cherry picked from commit 246c270)
    mattisonchao authored and liangyepianzhou committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    2e3e9de View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2023

  1. [branch-2.10][test]Run and fix tests (apache#19636)

    Co-authored-by: Cong Zhao <zhaocong@apache.org>
    Co-authored-by: fengyubiao <9947090@qq.com>
    Co-authored-by: AloysZhang <lofterzhang@gmail.com>
    4 people committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    0eaa671 View commit details
    Browse the repository at this point in the history
  2. [improve] Upgrade wildfly-eytron (used by debezium) to fix CVE-2022-3143

     (apache#19333)
    
    (cherry picked from commit 71dafe8)
    dlg99 authored and liangyepianzhou committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    2c591ae View commit details
    Browse the repository at this point in the history
  3. [improve][misc] Upgrade Netty to 4.1.87.Final (apache#19417)

    (cherry picked from commit 27d392d)
    lhotari authored and liangyepianzhou committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    aa7beba View commit details
    Browse the repository at this point in the history
  4. [improve] Upgrade to zk 3.8.1 (apache#19425)

    (cherry picked from commit 6bf4966)
    dlg99 authored and liangyepianzhou committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    e32f9ad View commit details
    Browse the repository at this point in the history
  5. [improve] Upgrade lombok to 1.8.26 (apache#19426)

    (cherry picked from commit ca177b3)
    merlimat authored and liangyepianzhou committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    a0a4d93 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2023

  1. Revert "[improve] Upgrade to zk 3.8.1 (apache#19425)"

    This reverts commit e32f9ad.
    liangyepianzhou committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    8fde241 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    080dfc8 View commit details
    Browse the repository at this point in the history
  3. [fix] [ml] topic load fail by ledger lost (apache#19444)

    Makes only ledgers removed from the meta of ledger info can be deleted from the BK.
    
    (cherry picked from commit 3314d70)
    poorbarcode committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    8945b83 View commit details
    Browse the repository at this point in the history
  4. [improve] [admin] Make the default value of param --get-subscription-…

    …backlog-size of admin API topics stats true (apache#19302)
    
    (cherry picked from commit e417fe7)
    poorbarcode committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    a863e7d View commit details
    Browse the repository at this point in the history
  5. Revert "[improve] [admin] Make the default value of param --get-subsc…

    …ription-backlog-size of admin API topics stats true (apache#19302)"
    
    This reverts commit a863e7d.
    michaeljmarshall committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    2077233 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2023

  1. Configuration menu
    Copy the full SHA
    96e3f39 View commit details
    Browse the repository at this point in the history
  2. [branch-2.10][broker] Support zookeeper read-only config. (apache#19156

    …) (apache#19637)
    
    Co-authored-by: Yan Zhao <horizonzy@apache.org>
    liangyepianzhou and horizonzy committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    a8f3c81 View commit details
    Browse the repository at this point in the history
  3. [improve] Simplify enabling Broker, WS Proxy hostname verification (a…

    …pache#19674)
    
    When we merged apache#15818 in order to make the broker's client configurable, we did not add an explicit config for hostname verification. This PR adds that config to the broker and the websocket proxy. I chose the name `tlsHostnameVerificationEnabled` because that is what is already used in the proxy. It diverges from the function worker's config of `tlsEnableHostnameVerification`.
    
    Before this PR, you would have enabled hostname verification by configuring `brokerClient_tlsHostnameVerificationEnable=true` in the broker and WS proxy configs. (Note that the variable name is slightly different because the `ClientConfiguration` does not have a `d` at the end of its name.
    
    The remaining follow up work will be to update the `ClusterData` objects to configure hostname verification there to make it easier to configure hostname verification for remote clusters.
    
    * Add `tlsHostnameVerificationEnabled` to the `broker.conf` and the `proxy.conf`
    * Update all of the relevant locations that were previously only relying on `brokerClient_tlsHostnameVerificationEnable`
    
    I added a single test to ensure that the `WebSocketProxyConfiguration` properly converts to the `ServiceConfiguration` object.
    
    Otherwise, I verified that anywhere we are using `"brokerClient_"`, this PR also adds the right configuration.
    
    This PR introduces a "new" configuration key, but not a new concept. All underlying behaviors are unchanged.
    
    - [x] `doc-not-needed`
    
    Docs are automatically updated by these changes.
    
    (cherry picked from commit 6621fd3)
    (cherry picked from commit b8083b0)
    michaeljmarshall committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    a3a242c View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2023

  1. Release 2.10.4

    liangyepianzhou committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    d1aebd3 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2023

  1. release 2.10.4 test

    liangyepianzhou committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    d8763d4 View commit details
    Browse the repository at this point in the history
  2. Revert "release 2.10.4 test"

    This reverts commit d8763d4.
    liangyepianzhou committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    f5c7de2 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2023

  1. Configuration menu
    Copy the full SHA
    92f68e3 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. [fix] [broker] Topic close failure leaves subscription in a permanent…

    … fence state (apache#19692)
    
    Motivation : After a Topic close failure or a delete failure, the fence state will be reset to get the topic back to work,but it will not reset the fence state of the subscription, which will result in the consumer never being able to connect to the broker.
    Modifications: Reset the fence state of subscriptions if the operation of topic close is failed.
    (cherry picked from commit cdeef00)
    poorbarcode committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    751eeea View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2023

  1. [cherry-pick][branch-2.10] Fix deadlock causes session notification n…

    …ot to work (apache#19754) (apache#19768)
    
    Co-authored-by: Qiang Zhao <mattisonchao@apache.org>
    Master apache#19754
    ### Motivation
    
    This is a namespace bundle double-owners problem. We found it in the memory dumps.
    
    The memory dumps show that the notification thread has been blocked for a long time by the leader election deadlock, And many notifications are blocked in the executor queue. This causes we can't to revalidate the locks, and they are still thinking them working well.
    
    For private reasons, I can't share the namespace bundle snapshot, but the blocked thread easily explains it.
    
    <img width="1061" alt="image" src="https://user-images.githubusercontent.com/74767115/223670419-c4319f44-f1e1-4361-8c79-04c7f0dabe3c.png"> ^^ blocked thread
    
    <img width="949" alt="image" src="https://user-images.githubusercontent.com/74767115/223672000-fb4ce22c-6a45-4cb6-9d23-c36e3afbc93a.png">
    
    ^^ executor queue
    
    ### Modifications
    
    - Avoid putting the new task to single thread executor causes deadlock.
    
    (cherry picked from commit cbd799f)
    liangyepianzhou committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    36794d9 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2023

  1. [fix][client][branch-2.10]Return local thread for the newThread (ap…

    …ache#19779)
    
    ### Motivation
    The original fix is apache#18268.
    But after the fix is cherry-picked, the fix is overridden when resolving
    conflicts for cherry-pick apache#18211.
    ### Modifications
    Return the local thread variables in the `newThread`.
    liangyepianzhou committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    240c22c View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Configuration menu
    Copy the full SHA
    4449814 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f47bd1 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. Configuration menu
    Copy the full SHA
    7ea5f43 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2023

  1. [test] Fix ServerCnxTest failing after merge of apache#19830

    The ServerCnxTest class is run as part of the flaky tests,
    so apache#19830 was merged
    without noticing that the changes didn't actually pass
    tests. This commit fixes the test by changing the assertions
    to ensure that "correct" combinations of roles and original
    principals are verified.
    
    (cherry picked from commit 13f4a0d)
    michaeljmarshall committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    45f303c View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. [improve][admin][branch-2.10] Unset namespace policy to improve delet…

    …ing namespace (apache#17033) (apache#19865)
    
    Co-authored-by: Jiwei Guo <technoboy@apache.org>
    liangyepianzhou and Technoboy- committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    70b8617 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. [fix] [admin] Make response code to 400 instead of 500 when delete to…

    …pic fails due to enabled geo-replication (apache#19879)
    
    Motivation: As expected, If geo-replication is enabled, a topic cannot be deleted. However deleting that topic returns a 500, and no further info.
    Modifications: Make response code to 400 instead of 500 when delete topic fails due to enabled geo-replication
    (cherry picked from commit a903733)
    poorbarcode committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    db6a59b View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2023

  1. [fix] [broker] Counter of pending send messages in Replicator incorre…

    …ct if schema future not complete (apache#19242)
    
    (cherry picked from commit 3ba6fa8)
    poorbarcode committed Mar 25, 2023
    Configuration menu
    Copy the full SHA
    348865c View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2023

  1. [fix] [proxy] Used in proxyConf file when configuration is missing in…

    … the command line (apache#15938)
    
    (cherry picked from commit 5455f4d)
    poorbarcode committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    26fd716 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. [fix] [admin] fix incorrect state replication.connected on API partit…

    …ioned-topic stat (apache#19942)
    
    ### Motivation
    
    Pulsar will merge the variable `PartitionedTopicStatsImpl.replication[x].connected` by the way below when we call `pulsar-admin topics partitioned-stats`
    
    ``` java
    this.connected = this.connected & other.connected
    ```
    
    But the variable `connected` of `PartitionedTopicStatsImpl.replication` is initialized `false`, so the expression `this.connected & other.connected` will always be `false`.
    
    Then we will always get the value `false` if we call `pulsar-admin topics partitioned-stats`.
    
    ### Modifications
    
    make the variable `` of `PartitionedTopicStatsImpl` is initialized `true`
    
    (cherry picked from commit 9fc0b5e)
    poorbarcode committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    4f15792 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2023

  1. Configuration menu
    Copy the full SHA
    e078c6d View commit details
    Browse the repository at this point in the history
  2. [Authenticate] fix Invalid signature error when use Kerberos Authenti…

    …cation (apache#15121)
    
    * fix SaslRoleTokenSigner Invalid signature when use Kerberos Authentication
    
    * fix checkstyle violation
    
    * add saslJaasServerRoleTokenSignerSecret configuration fields in broker.conf
    
    * add secret in proxy.conf
    
    * supply the secret as a file
    
    * set default value
    
    * fix test error
    
    * fix test error
    
    * saslJaasServerRoleTokenSignerSecretPath must be set
    
    * add secret configuration into the WorkerConfig and the conf/functions_worker.yml
    
    * fix checkstyle error
    
    * chang URL.createURL to  URI.create
    
    Co-authored-by: liudezhi <liudezhi2098@163.com>
    
    When use Kerberos authentication ,  using Pulsar Admin to query topic state, will appear HTTP 401 Unauthorized, becasue
    request redirect url  will use current SaslRoleToken ,but  redirect broker not recognized  the token, per broker secret is not same.
    ```
    WARN  org.apache.pulsar.broker.web.AuthenticationFilter - [10.3.0.4] Failed to authenticate HTTP request: Invalid signature
    ```
    per broker secret is  Random
    ```
    protected String computeSignature(String str) {
            try {
                MessageDigest md = MessageDigest.getInstance("SHA-512");
    
                md.update(str.getBytes());
    
                md.update(secret);
                byte[] digest = md.digest();
                return new Base64(0).encodeToString(digest);
            } catch (NoSuchAlgorithmException ex) {
                throw new RuntimeException("It should not happen, " + ex.getMessage(), ex);
            }
        }
    ```
    
    secret can configuration
    `this.signer = new SaslRoleTokenSigner(config.getSaslJaasServerRoleTokenSignerSecret().getBytes());`
    
    *If `yes` was chosen, please highlight the changes*
    
      - Dependencies (does it add or upgrade a dependency): (yes / no)
      - The public API: (no)
      - The schema: (no )
      - The default values of configurations: (yes)
      - The wire protocol: (no)
      - The rest endpoints: (no)
      - The admin cli options: ( no)
      - Anything that affects deployment: (no)
    
    Need to update docs?
    
    - [x]  `doc`
    
    (cherry picked from commit f0b7efa)
    liudezhi2098 authored and poorbarcode committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    72b9552 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2023

  1. [fix][ci][branch-2.10] Fix the release tools (apache#19711)

    ## Modification
    1. Upgrade python to python3
    2. Remove the cpp-related command
    liangyepianzhou committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    c3282bc View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2023

  1. [branch-2.10][fix][broker] Fix index generator is not rollback after …

    …entries are failed added (apache#19980)
    
    Co-authored-by: gavingaozhangmin <gavingaozhangmin@didiglobal.com>
    gaozhangmin and gavingaozhangmin committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    9381b85 View commit details
    Browse the repository at this point in the history
  2. [Build] Make the test JVM exit if OOME occurs (apache#14509)

    - OOMEs can make the build to take very long to complete.
      It's better to fail fast in tests when OOMEs occur.
    
    (cherry picked from commit 89a36f9)
    lhotari authored and poorbarcode committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    a19879b View commit details
    Browse the repository at this point in the history
  3. [branch-2.10] [fix] [auth] fix not forward compatible config saslJaas…

    …ServerRoleTokenSignerSecretPath after cherry-pick apache#15121 (apache#19971)
    
    After cherry-picked apache#15121 into branch-2.10 to solve the issue sasl authentication failure, we will do a follow-up process to keep the new configuration `saslJaasServerRoleTokenSignerSecretPath` forward compatible: make this config optinal.
    poorbarcode committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    cef4f71 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2023

  1. [fix][broker] Ignore and remove the replicator cursor when the remote…

    … cluster is absent (apache#19972)
    
    (cherry picked from commit d1fc732)
    BewareMyPower committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    b93176c View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. [fix][broker] Only validate superuser access if authz enabled (apache…

    …#19989)
    
    In apache#19455, I added a requirement that only the proxy role could supply an original principal. That check is only supposed to apply when the broker has authorization enabled. However, in one case, that was not the case. This PR does a check and returns early when authorization is not enabled in the broker.
    
    See apache#19830 (comment) for additional motivation.
    
    * Update the `PulsarWebResource#validateSuperUserAccessAsync` to only validate when authentication and authorization are enabled in the configuration.
    
    This is a trivial change. It'd be good to add tests, but I didn't include them here because this is a somewhat urgent fix. There was one test that broke because of this change, so there is at least some existing coverage.
    
    - [x] `doc-not-needed`
    
    PR in forked repository: michaeljmarshall#39
    
    (cherry picked from commit 1a6c28d)
    michaeljmarshall committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    36f0db5 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2023

  1. [improve][txn] Cleanup how superusers abort txns (apache#19976)

    This PR builds on apache#19467. When we modify/abort transactions, we need to make sure that authorization is checked for both the proxy and the client.
    
    * Add a second authorization check when `originalPrincipal` is set in the `ServerCnx`.
    * Fix a bug where we were not doing a deep copy of the `SubscriptionsList` object. (Tests caught this bug!)
    
    Added a new test to cover some of the changes.
    
    This is an internal change.
    
    - [x] `doc-not-needed`
    
    PR in forked repository: michaeljmarshall#38
    
    (cherry picked from commit f76beda)
    (cherry picked from commit 5a180f78d7636537198a758e1c9416e58d80bf42)
    michaeljmarshall committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    716db37 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2023

  1. [refactor][fn] Use AuthorizationServer more in Function Worker API (a…

    …pache#19975)
    
    The current function worker interfaces introduced by apache#8560 are hard to extend. It is better to pass an object that we can add fields to as needed.
    
    * Introduce a new `Authentication` class to wrap all of the relevant authentication "data". This class is somewhat unfortunate in that we already have many classes that hold authentication information. However, my goal with this class is to wrap all of the relevant auth info. This class is only currently used in the Function Worker API, but I plan to add it to the rest of the Admin HTTP endpoints.
    * Deprecate all of the methods that are no longer needed. Add a default implementation to call the new methods that supersede those methods.
    * Add `proxyRoles` setting to function worker.
    
    There are tests to cover the changes.
    
    This PR changes several interfaces in completely backwards compatible ways. It's possible we'll want to improve the abstraction for the `Authentication` class by making it an interface.
    
    - [x] `doc`
    
    This change has Javadoc updates to document the changes.
    
    PR in forked repository: michaeljmarshall#37
    
    (cherry picked from commit 55acbe6)
    (cherry picked from commit 54c97ad)
    michaeljmarshall committed Apr 8, 2023
    Configuration menu
    Copy the full SHA
    cf40926 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2023

  1. [refactor][broker] Use AuthenticationParameters for rest producer (ap…

    …ache#20046)
    
    In apache#19975, we introduced a wrapper for all authentication parameters. This PR adds that wrapper to the Rest Producer.
    
    * Use `AuthenticationParameters` to simplify parameter management in Rest Producer.
    * Add method to the `AuthorizationService` that takes the `AuthenticationParameters`.
    * Update annotations on Rest Producer to indicate that a 401 is an expected response.
    
    This change is covered by the `TopicsAuthTest`.
    
    - [x] `doc-not-needed`
    
    This is an internal change that does not need to be documented.
    
    PR in forked repository: skipping PR since the relevant tests pass locally
    
    (cherry picked from commit 7990948)
    (cherry picked from commit 02b27e8)
    michaeljmarshall committed Apr 10, 2023
    Configuration menu
    Copy the full SHA
    4b9befa View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2023

  1. [fix] [cli] Fix Broker crashed by too much memory usage of pulsar too…

    …ls (apache#20031)
    
    ### Motivation
    After apache#15868, we allow `PULSAR_MEM` & `PULSAR_GC` to be overridden in `pulsar_tool_env.sh`.
    
    Many users set `-Xms` to `2G` or larger in `PULSAR_MEM`, this will make the tools(such as `pulsar-admin`) cost a lot of memory, and if users execute `pulsar-admin` or another tool on the machine where the Broker is deployed, the current device will not have enough memory to allocate, resulting in a broker crash.
    
    ### Modifications
    
    When `PULSAR_MEM` is overridden  in `pulsar_tool_env.sh`, delete parameter `-Xms`
    
    (cherry picked from commit 4f503fd)
    poorbarcode committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    1fe05d5 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. [improve] [broker] Fix broker restart logic (apache#20113)

    (cherry picked from commit 092819b)
    wolfstudy authored and codelipenghui committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    9e47fa6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bff920a View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2023

  1. [fix] Use scheduled executor in BinaryProtoLookupService (apache#20043)

    Motivation: PulsarClient using ExecutorService as ScheduledExecutorService
    
    Modifications: Use exactly ScheduledExecutorService
    mgrenonville authored and Technoboy- committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    bdd70e5 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2023

  1. Configuration menu
    Copy the full SHA
    d86e168 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2023

  1. Configuration menu
    Copy the full SHA
    f8dc8c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6c99903 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2023

  1. Configuration menu
    Copy the full SHA
    73462d6 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. Configuration menu
    Copy the full SHA
    d3766c8 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Configuration menu
    Copy the full SHA
    b062d8c View commit details
    Browse the repository at this point in the history

Commits on May 6, 2023

  1. Configuration menu
    Copy the full SHA
    ec2b084 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4392da6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6bf6b33 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9f096da View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9a9f005 View commit details
    Browse the repository at this point in the history
  6. [fix] [broker] Fast fix infinite HTTP call getSubscriptions caused by…

    … wrong topicName (apache#20131)
    
    (cherry picked from commit 0c50866)
    poorbarcode committed May 6, 2023
    Configuration menu
    Copy the full SHA
    eff0a29 View commit details
    Browse the repository at this point in the history
  7. [fix] [ml] make the result of delete cursor is success if cursor is d…

    …eleted (apache#19825)
    
    When deleting the zk node of the cursor, if the exception `MetadataStoreException.NotFoundException`  occurs, the deletion is considered successful.
    
    (cherry picked from commit f294be3)
    poorbarcode committed May 6, 2023
    Configuration menu
    Copy the full SHA
    eaba2f9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    85f4d0e View commit details
    Browse the repository at this point in the history
  9. [fix] [broker] delete topic failed if disabled system topic (apache#1…

    …9735)
    
    Motivation: After PR apache#18823, The cmd delete topic will fail if disabled the feature system topic.
    Modifications: do not delete the system policy if disabled the feature system topic
    (cherry picked from commit 401fb05)
    poorbarcode committed May 6, 2023
    Configuration menu
    Copy the full SHA
    22a0c6d View commit details
    Browse the repository at this point in the history
  10. [fix][client] Release the orphan producers after the primary consumer…

    … is closed (apache#19858)
    
    Motivation: The producers ["retryLetterProducer", "deadLetterProducer"] will be auto-created by consumers if enabled `DLQ`, but these producers will not close after consumers are closed.
    
    Modifications: Auto close "retryLetterProducer" and "deadLetterProducer" after the primary consumer is closed
    (cherry picked from commit 94ae340)
    poorbarcode committed May 6, 2023
    Configuration menu
    Copy the full SHA
    a0ff522 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    793de9a View commit details
    Browse the repository at this point in the history
  12. [fix] [broker] Producer created by replicator is not displayed in top…

    …ic stats (apache#20229)
    
    ### Motivation
    
    A producer of the remote cluster is automatically created when replication is turned on. But we can't see anything about it from the response of `(remote cluster) pulsar-admin topic stats`
    
    ### Modifications
    
    Make this producer displayed in the topic stats
    
    (cherry picked from commit 9f7a539)
    poorbarcode committed May 6, 2023
    Configuration menu
    Copy the full SHA
    bf117bb View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    bd7c9ff View commit details
    Browse the repository at this point in the history

Commits on May 7, 2023

  1. [fix] [broker] Upgrade rocksDB version to 6.29.4.1 to keep in sync wi…

    …th BookKeeper's RocksDB version (apache#20243)
    hangc0276 committed May 7, 2023
    Configuration menu
    Copy the full SHA
    f88a49e View commit details
    Browse the repository at this point in the history
  2. [fix][monitor] Fix the partitioned publisher topic stat aggregation b…

    …ug (apache#18807)
    
    (cherry picked from commit 8790ed1)
    heesung-sn authored and poorbarcode committed May 7, 2023
    Configuration menu
    Copy the full SHA
    b5b2de6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c934df7 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. Configuration menu
    Copy the full SHA
    f6eee8d View commit details
    Browse the repository at this point in the history
  2. [improve] [broker] Skip split boundle if only one broker (apache#20190)

    Co-authored-by: Zixuan Liu <nodeces@gmail.com>
    (cherry picked from commit d135c4a)
    poorbarcode committed May 8, 2023
    Configuration menu
    Copy the full SHA
    7da7873 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    80dcea7 View commit details
    Browse the repository at this point in the history
  4. [fix][broker] Fix RoaringBitmap.contains can't check value 65535 (a…

    …pache#20176)
    
    (cherry picked from commit 2f9f5df)
    coderzc authored and poorbarcode committed May 8, 2023
    Configuration menu
    Copy the full SHA
    edc3a6f View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. Revert "[fix] [broker] [branch-2.10] Upgrade rocksDB version to 6.29.…

    …4.1 to keep in sync with BookKeeper's RocksDB version (apache#20287)
    hangc0276 committed May 10, 2023
    Configuration menu
    Copy the full SHA
    88038e3 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. [fix][monitor] topic with double quote breaks the prometheus format (a…

    …pache#20230)
    
    (cherry picked from commit ea56197)
    (cherry picked from commit f94c8cb)
    nicoloboschi committed May 11, 2023
    Configuration menu
    Copy the full SHA
    d8bf38e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14dd76f View commit details
    Browse the repository at this point in the history
  3. [improve] [broker] Skip split boundle if only one broker (apache#20190)

    Co-authored-by: Zixuan Liu <nodeces@gmail.com>
    (cherry picked from commit d135c4a)
    poorbarcode committed May 11, 2023
    Configuration menu
    Copy the full SHA
    f3edfc5 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2023

  1. [fix] [broker] [branch-2.10] Upgrade rocksDB version to 6.16.4 to kee…

    …p sync with BookKeeper 4.14.7 (apache#20312)
    hangc0276 committed May 12, 2023
    Configuration menu
    Copy the full SHA
    1c00154 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2023

  1. [fix][build] update the zookeeper version to 3.6.4 (apache#20333)

    Co-authored-by: Jiwe Guo <technoboy@apache.org>
    horizonzy and Technoboy- committed May 17, 2023
    Configuration menu
    Copy the full SHA
    3eed289 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2023

  1. [fix][broker]Fix deadlock of metadata store (apache#20189)

    Motivation: This task loadOrCreatePersistentTopic occupied the event thread of the ZK client so that other ZK tasks could not be finished anymore(Including the task itself), and it calls bundlesCache.synchronous().get(nsname) which is a blocking method.
    
    Modification: Since the method getBundle(topic) will eventually call the method bundlesCache.synchronous().get(nsname), use getBundleAsync(topic) instead of getBundle(topic) to avoid blocking the thread.
    (cherry picked from commit 4678c36)
    poorbarcode committed May 18, 2023
    Configuration menu
    Copy the full SHA
    8a1a4be View commit details
    Browse the repository at this point in the history

Commits on May 19, 2023

  1. [fix] [broker] In Key_Shared mode: remove unnecessary mechanisms of m…

    …essage skip to avoid unnecessary consumption stuck (apache#20335)
    
    - apache#7105 provide a mechanism to avoid a stuck consumer affecting the consumption of other consumers:
      - if all consumers can not accept more messages, stop delivering messages to the client.
      - if one consumer can not accept more messages, just read new messages and deliver them to other consumers.
    - apache#7553 provide a mechanism to fix the issue of lost order of consumption: If the consumer cannot accept any more messages, skip the consumer for the next round of message delivery because there may be messages with the same key in the replay queue.
    - apache#10762 provide a mechanism to fix the issue of lost order of consumption: If there have any messages with the same key in the replay queue, do not deliver the new messages to this consumer.
    
    apache#10762 and apache#7553 do the same thing and apache#10762 is better than apache#7553 , so apache#7553 is unnecessary.
    
    remove the mechanism provided by apache#7553 to avoid unnecessary consumption stuck.
    
    (cherry picked from commit 1e664b7)
    poorbarcode committed May 19, 2023
    Configuration menu
    Copy the full SHA
    c973603 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. [fix] [broker] error TimeUnit to record publish latency (apache#20074)

    Co-authored-by: fanjianye <fanjianye@bigo.sg>
    Co-authored-by: tison <wander4096@gmail.com>
    3 people authored and Technoboy- committed May 23, 2023
    Configuration menu
    Copy the full SHA
    8be5279 View commit details
    Browse the repository at this point in the history
  2. [improve][broker] Get lowest PositionImpl from NavigableSet (apache#1…

    …8278)
    
    * [cleanup] Direct get lowest PositionImpl from TreeMap
    
    change signature from Set<T> to NavigableSet<T>
    which makes the caller to get lowest PositionImpl more efficient.
    
    * change poll to first when call `NavigableSet`
    
    * fix check style remove unused import
    
    Co-authored-by: wangjinlong <wangjinlong@zhihu.com>
    2 people authored and Technoboy- committed May 23, 2023
    Configuration menu
    Copy the full SHA
    01badd2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b07ae00 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    976c2c3 View commit details
    Browse the repository at this point in the history
  5. [fix][ml] Fix ledger left in OPEN state when enable `inactiveLedgerRo…

    …llOverTimeMs` (apache#20276)
    
    close `currentLegder` after roll current ledger if full
    lifepuzzlefun authored and Technoboy- committed May 23, 2023
    Configuration menu
    Copy the full SHA
    64688d5 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. Configuration menu
    Copy the full SHA
    ee02ec6 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2023

  1. Configuration menu
    Copy the full SHA
    4a1719d View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. [fix][broker] partitioned __change_events topic is policy topic (apac…

    …he#20392)
    
    (cherry picked from commit 9918bce)
    
    backported to branch-2.10 by renaming SystemTopicsNames to EventsTopicNames
    michaeljmarshall authored and lhotari committed May 26, 2023
    Configuration menu
    Copy the full SHA
    323d112 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2023

  1. Configuration menu
    Copy the full SHA
    d8876d5 View commit details
    Browse the repository at this point in the history
  2. [fix][sec] Upgrade sqlite-jdbc to resolve CVE-2023-32697 (apache#20411)

    (cherry picked from commit a953027)
    lhotari committed May 29, 2023
    Configuration menu
    Copy the full SHA
    f2d7808 View commit details
    Browse the repository at this point in the history
  3. [fix][broker] If ledger lost, cursor mark delete position can not for…

    …ward (apache#18620)
    
    Motivation:
    Configuration `autoSkipNonRecoverableData` is designed to turn this feature on if we can accept partial data loss. When a ledger is lost, the broker will still work. But now we have this problem: If a ledger is lost, consumer and producer can work, but the cursor mark delete position can not forward.
    
    Modifications:
    - When an unrecoverable ledger is found, remove the records in`individualDeletedMessages` and `batchDeletedIndexes`.
    - When the managed cursor is recovered, check whether there are invalid records in `individualDeletedMessages` and `batchDeletedIndexes` and print a warning log.
    
    (cherry picked from commit ab810f4)
    poorbarcode committed May 29, 2023
    Configuration menu
    Copy the full SHA
    3cc9001 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2023

  1. [improve][misc] Upgrade Netty to 4.1.89.Final (apache#19649)

    - Contains important Netty bug fixes and improvements
    - Upgrade Netty to 4.1.89.Final and io_uring transport to 0.0.18.Final
    Release notes:
    - 4.1.88.Final: https://netty.io/news/2023/02/12/4-1-88-Final.html
    - 4.1.89.Final: https://netty.io/news/2023/02/13/4-1-89-Final.html
    - io_uring 0.0.18.Final: https://netty.io/news/2023/02/22/io_uring_0-0-18-Final.html
    
    (cherry picked from commit 1a76e0d)
    lhotari committed May 30, 2023
    Configuration menu
    Copy the full SHA
    a54a4e0 View commit details
    Browse the repository at this point in the history
  2. [improve][misc] Upgrade Netty to 4.1.93.Final (apache#20423)

    (cherry picked from commit e380910)
    lhotari committed May 30, 2023
    Configuration menu
    Copy the full SHA
    db1f9ab View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2023

  1. [fix][fn]Reset idle timer correctly (apache#20450)

    Co-authored-by: Andy Walker <andy@andy.dev>
    
    Fix apache#20449
    
    <!-- or this PR is one task of an issue -->
    
    Master Issue: apache#20449
    
    ### Verifying this change
    
    - [ ] Make sure that the change passes the CI checks.
    
    This change is a trivial rework / code cleanup without any test coverage.
    
    ### Does this pull request potentially affect one of the following parts:
    
    <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
    
    *If the box was checked, please highlight the changes*
    
    - [ ] Dependencies (add or upgrade a dependency)
    - [ ] The public API
    - [ ] The schema
    - [ ] The default values of configurations
    - [ ] The threading model
    - [ ] The binary protocol
    - [ ] The REST endpoints
    - [ ] The admin CLI options
    - [ ] The metrics
    - [ ] Anything that affects deployment
    
    ### Documentation
    
    <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
    
    - [ ] `doc` <!-- Your PR contains doc changes. -->
    - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
    - [X] `doc-not-needed` <!-- Your PR changes do not impact docs -->
    - [ ] `doc-complete` <!-- Docs have been already added -->
    
    ### Matching PR in forked repository
    
    PR in forked repository: flowchartsman#5
    
    (cherry picked from commit e05b890)
    flowchartsman authored and michaeljmarshall committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    dfb2d5e View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2023

  1. [fix][client] Cache empty schema version in ProducerImpl schemaCache. (

    …apache#19929)
    
    Co-authored-by: wangjinlong <wangjinlong@zhihu.com>
    (cherry picked from commit cff3f9b)
    lifepuzzlefun authored and RobertIndie committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    a46acef View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    32b4607 View commit details
    Browse the repository at this point in the history
  2. Fix license header with missing *

      The missing * was introduced by a46acef
    michaeljmarshall committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    03c7add View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2023

  1. [fix][build][branch-2.10] Fix ci-license check (apache#20505)

    Co-authored-by: Lari Hotari <lhotari@apache.org>
    RobertIndie and lhotari committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    832d7e0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    071af38 View commit details
    Browse the repository at this point in the history
  3. [fix][sec] Upgrade Guava to 32.0.0 to address CVE-2023-2976 (apache#2…

    …0459)
    
    (cherry picked from commit 57f9467)
    
    # Conflicts:
    #	pom.xml
    #	pulsar-sql/presto-distribution/LICENSE
    lhotari committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    1cc99b3 View commit details
    Browse the repository at this point in the history
  4. [fix][build] Don't publish docker image with "latest" tag to docker r…

    …epository
    
    (cherry picked from commit 49d81af)
    lhotari committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    33a45e0 View commit details
    Browse the repository at this point in the history
  5. [fix][io] Close the kafka source connector if there is uncaught excep…

    …tion (apache#20479)
    
    Signed-off-by: Zike Yang <zike@apache.org>
    RobertIndie committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    49eaa30 View commit details
    Browse the repository at this point in the history
  6. [fix][broker] Fix skip message API when hole messages exists (apache#…

    …20326)
    
    (cherry picked from commit c35b820)
    crossoverJie authored and lhotari committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    3f84354 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6506d6a View commit details
    Browse the repository at this point in the history
  8. [fix][fn] Go functions must retrieve consumers by non-particioned top…

    …ic ID (apache#20413)
    
    Co-authored-by: Andy Walker <andy@andy.dev>
    (cherry picked from commit fb1b46e)
    flowchartsman authored and michaeljmarshall committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    b6c2743 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2023

  1. [fix][fn] Configure pulsar admin for TLS (apache#20533)

    ### Motivation
    
    This PR is a combination of apache#20482 and apache#20513 because cherry picking those PRs produced too many conflicts.
    
    ### Modifications
    
    * Made the same addition as the source PRs, though the code has changed a bit, so I had to make a few extra changes.
    ### Documentation
    
    - [x] `doc-not-needed`
    
    (cherry picked from commit 8c9c6e9)
    michaeljmarshall committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    2b0659a View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2023

  1. Configuration menu
    Copy the full SHA
    acb8fd9 View commit details
    Browse the repository at this point in the history
  2. [fix][broker] Restore solution for certain topic unloading race condi…

    …tions (apache#20527)
    
    (cherry picked from commit 03f9167)
    lhotari committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    2fc0742 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2023

  1. [fix][broker] REST Client Producer fails with TLS only (apache#20535)

    Co-authored-by: Matt Anderson <>
    
    Fixes apache#20536
    
    ### Motivation
    
    When disabling HTTP ports in the Pulsar broker, the [REST Client Producer](https://pulsar.apache.org/docs/3.0.x/client-libraries-rest/) fails to produce messages. For reproduction steps, please reference issue details.
    
    ### Modifications
    
    Change the following lines:
    ```java
    
                LookupResult result = optionalResult.get();
                if (result.getLookupData().getHttpUrl().equals(pulsar().getWebServiceAddress())) {
                    // Current broker owns the topic, add to owning topic.
    ```
    To:
    ```java
                LookupResult result = optionalResult.get();
                if (result.getLookupData().getHttpUrl().equals(pulsar().getWebServiceAddress())
                        || result.getLookupData().getHttpUrlTls().equals(pulsar().getWebServiceAddressTls())) {
                    // Current broker owns the topic, add to owning topic.
    ```
    
    ### Verifying this change
    
    This change is a trivial rework / code cleanup without any test coverage. (outside of the reproduction tests described in the apache#20536)
    
    <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
    
    *If the box was checked, please highlight the changes*
    
    - [ ] Dependencies (add or upgrade a dependency)
    - [ ] The public API
    - [ ] The schema
    - [ ] The default values of configurations
    - [ ] The threading model
    - [ ] The binary protocol
    - [x] The REST endpoints
    - [ ] The admin CLI options
    - [ ] The metrics
    - [ ] Anything that affects deployment
    
    ### Documentation
    
    <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
    
    - [ ] `doc` <!-- Your PR contains doc changes. -->
    - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
    - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
    - [ ] `doc-complete` <!-- Docs have been already added -->
    
    ### Matching PR in forked repository
    
    PR in forked repository: https://github.com/maanders-tibco/pulsar
    
    <!--
    After opening this PR, the build in apache/pulsar will fail and instructions will
    be provided for opening a PR in the PR author's forked repository.
    
    apache/pulsar pull requests should be first tested in your own fork since the
    apache/pulsar CI based on GitHub Actions has constrained resources and quota.
    GitHub Actions provides separate quota for pull requests that are executed in
    a forked repository.
    
    The tests will be run in the forked repository until all PR review comments have
    been handled, the tests pass and the PR is approved by a reviewer.
    -->
    
    (cherry picked from commit 005cce1)
    maanders-tibco authored and michaeljmarshall committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    ebb97d0 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2023

  1. [fix][broker] release orphan replicator after topic closed (apache#20567

    )
    
    Motivation: When the `replicator.producer` retries to start<sup>[1]</sup> the topic close<sup>[2]</sup> executed concurrently, there is an orphan replicator after this topic is closed.
    Modifications: If the topic was already closed, stop to retry.
    (cherry picked from commit d85736c)
    poorbarcode committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    db7832b View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2023

  1. [cleanup][broker] Validate authz earlier in delete subscription logic (

    …apache#20549)
    
    Move the authorization check a few steps earlier in the delete subscription admin endpoint.
    
    * Move the authz check earlier
    
    We do not have any tests for these endpoints. We should add them. This change is trivial enough that I think it is fine to defer on testing the authz change.
    
    - [x] `doc-not-needed`
    
    (cherry picked from commit c73967c)
    (cherry picked from commit 47f7487)
    michaeljmarshall committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    04a7a60 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2023

  1. Configuration menu
    Copy the full SHA
    b355d31 View commit details
    Browse the repository at this point in the history
  2. [improve][test][branch-2.10] Backport disabling disk usage threshold …

    …for Elastic Testcontainers (apache#20676)
    lhotari committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    526e216 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. Configuration menu
    Copy the full SHA
    39cf8d7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa68bf3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    55609eb View commit details
    Browse the repository at this point in the history
  4. Optimize conusmer pause (apache#14566)

    (cherry picked from commit a32edc7)
    Jason918 authored and liangyepianzhou committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    90369a0 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. [fix][fn] Exit JVM when main thread throws exception (apache#20689)

    Fixes: apache#20688
    
    When a function throws an exception that ends processing, we should exit the JVM.
    
    * Update `JavaInstanceMain` so that an exception leads to exiting the JVM. Since the class does not use any dependencies (see the class's Javadoc), we use reflection to shutdown logging.
    
    This change is a trivial rework / code cleanup without any test coverage.
    
    - [x] `doc-not-needed`
    
    (cherry picked from commit d83c7a6)
    michaeljmarshall committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    090d1b7 View commit details
    Browse the repository at this point in the history
  2. [fix][io] Close the kafka source connector got stuck (apache#20698)

    Motivation: apache#19880 (comment) When Kafka connector is closing, it waits for the `runnerThread` to stop, but the task-close is running at the same thread, so it will be stuck.
    
    Modifications: run `close` in another thread.
    (cherry picked from commit c5237ea)
    poorbarcode committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    3a2e593 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2023

  1. Configuration menu
    Copy the full SHA
    f10797a View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. [fix][broker]fix the publish latency spike issue with large number of…

    … producers (apache#20607)
    
    (cherry picked from commit 084d2ab)
    codelipenghui committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    9fa56fc View commit details
    Browse the repository at this point in the history
  2. [fix][sec] Upgrade snappy-java to address multiple CVEs (apache#20604)

    (cherry picked from commit 62a99ed)
    lhotari authored and nicoloboschi committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    186fc9d View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. Configuration menu
    Copy the full SHA
    c5f2128 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c9eb6bd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64831dc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ee3ad34 View commit details
    Browse the repository at this point in the history
  5. [fix] [Perf] PerformanceProducer do not produce expected number of me…

    …ssages. (apache#19775)
    
    Co-authored-by: tison <wander4096@gmail.com>
    2 people authored and Technoboy- committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    25bfc46 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    043ecd7 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. Issue 16802: fix Repeated messages of shared dispatcher (apache#16812)

    (cherry picked from commit 825b68d)
    eolivelli authored and liangyepianzhou committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    7093196 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3548d67 View commit details
    Browse the repository at this point in the history
  3. fix: bundle-data metadata leak because of bundlestats was not clean (a…

    …pache#17095)
    
    Co-authored-by: zhiyuanlei <zhiyuanlei@tencent.com>
    (cherry picked from commit e23a4c7)
    leizhiyuan authored and liangyepianzhou committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    f7138b9 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. [fix][flaky-test]NamespaceServiceTest.flaky/testModularLoadManagerRem…

    …oveBundleAndLoad (apache#17487)
    
    (cherry picked from commit 5c67ded)
    poorbarcode authored and liangyepianzhou committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    44c033c View commit details
    Browse the repository at this point in the history
  2. [fix][ws] Remove unnecessary ping/pong implementation (apache#20733)

    (cherry picked from commit 33044f0)
    (cherry picked from commit 11ee36d)
    michaeljmarshall committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    eac263e View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2023

  1. [broker] clean inactive bundle from bundleData in loadData and bundle…

    …sCache (apache#13974)
    
    * clean inactive bundle from bundleData in loadData and bundlesCache after the bundle be split or unload
    
    * update unit test clean inactive bundle from bundleData in loadData and bundlesCache after the bundle be split or unload
    
    * inactive bundle from bundleData in loadData and bundlesCache after the bundle be split or unload
    
    * clean inactive bundle from bundleData in loadData and bundlesCache after the bundle be split or unload
    
    * update unit test clean inactive bundle from bundleData in loadData and bundlesCache after the bundle be split or unload
    
    * inactive bundle from bundleData in loadData and bundlesCache after the bundle be split or unload
    
    * change the unit test function argument lists
    
    * fix unit test import list
    
    Co-authored-by: nicklixinyang <nicklixinyang@didiglobal.com>
    (cherry picked from commit f5019c8)
    Nicklee007 authored and liangyepianzhou committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    8d501f2 View commit details
    Browse the repository at this point in the history
  2. [fix] [txn] fix consumer can receive aborted txn message when readTyp…

    …e is replay (apache#19815)
    
    Co-authored-by: fanjianye <fanjianye@bigo.sg>
    (cherry picked from commit ac33311)
    TakaHiR07 authored and liangyepianzhou committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    4d7876b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ba506b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c1b3024 View commit details
    Browse the repository at this point in the history
  5. [fix][fn] Make KubernetesRuntime translate characters in function ten…

    …ant, namespace, and name during function removal to avoid label errors (apache#19584)
    
    Co-authored-by: tison <wander4096@gmail.com>
    (cherry picked from commit 9340d6e)
    csthomas1 authored and liangyepianzhou committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    3a3c6f3 View commit details
    Browse the repository at this point in the history
  6. [fix][client] Fix race condition that leads to caching failed Complet…

    …ableFutures in ConnectionPool (apache#19661)
    
    (cherry picked from commit 69fb3c2)
    eolivelli authored and liangyepianzhou committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    0a4639e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c5253fd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    32e1463 View commit details
    Browse the repository at this point in the history
  9. [improve][admin] Return BAD_REQUEST on cluster data is null for creat…

    …eCluster (apache#20346)
    
    (cherry picked from commit c075725)
    tisonkun authored and liangyepianzhou committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    46ef34a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a91874b View commit details
    Browse the repository at this point in the history
  11. [fix][broker] Fix return the earliest position when query position by…

    … timestamp. (apache#20457)
    
    (cherry picked from commit 0e60340)
    hanmz authored and liangyepianzhou committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    6a62499 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1dbc723 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e6d4f09 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    18f89b6 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7b6d1c9 View commit details
    Browse the repository at this point in the history
  16. [fix][broker] Topic policy can not be work well if replay policy mess…

    …age has any exception. (apache#20613)
    
    (cherry picked from commit 200fb56)
    zhanghaou authored and liangyepianzhou committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    0a69f66 View commit details
    Browse the repository at this point in the history
  17. [fix][schema] Only handle exception when there has (apache#20730)

    (cherry picked from commit 881a1f4)
    zymap authored and liangyepianzhou committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    b639685 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2023

  1. [fix][broker] Fix namespace deletion if __change_events topic has not…

    … been created yet (apache#18804)
    
    (cherry picked from commit 789122b)
    nicoloboschi authored and liangyepianzhou committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    043dbc3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9a6a460 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    823dc8c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d5631c9 View commit details
    Browse the repository at this point in the history
  5. [fix] [client] Messages lost when consumer reconnect (apache#20695)

    (cherry picked from commit 09c89cd)
    poorbarcode authored and liangyepianzhou committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    5d9f764 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7670e01 View commit details
    Browse the repository at this point in the history
  7. Update FaultInjectableZKRegistrationManager.java

    Missed the required /** in the license header
    dave2wave committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    0e70bdd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a4b3ae5 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c7925b3 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Configuration menu
    Copy the full SHA
    f8729c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    209b222 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Configuration menu
    Copy the full SHA
    643ffad View commit details
    Browse the repository at this point in the history
  2. Fix breaking change of the deprecated constructor of PersistentMessag…

    …eExpiryMonitor
    
    ### Motivation
    
    apache#20781 adds a new constructor to
    `PersistentMessageExpiryMonitor` and initialize the old constructor with
    
    ```java
    this.topic = subscription.topic;
    ```
    
    NPE will happen when `subscription` is null. However, it's allowed to
    pass a null `subscription` for test because methods like
    `findEntryFailed` don't depend on the `topic` field.
    
    ### Modifications
    
    Add the null check and mark the old constructor as deprecated.
    BewareMyPower committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    5c55633 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. [improve] [broker] Add consumer-id into the log when doing subscribe. (

    …apache#20568)
    
    - Since `cnx.address + consumerId` is the identifier of one consumer; add `consumer-id` into the log when doing subscribe.
    - add a test to confirm that even if the error occurs when sending messages to the client, the consumption is still OK.
    - print debug log if ack-command was discarded due to `ConsumerFuture is not complete.`
    - print debug log if sending a message to the client is failed.
    
    (cherry picked from commit a41ac49)
    poorbarcode committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    e25d764 View commit details
    Browse the repository at this point in the history
  2. [fix] [broker] Can not receive any messages after switch to standby c…

    …luster (apache#20767)
    
    (cherry picked from commit 465fac5)
    poorbarcode committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    20adfe4 View commit details
    Browse the repository at this point in the history
  3. Release 2.10.5

    liangyepianzhou committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    82c589f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c185ae4 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. Configuration menu
    Copy the full SHA
    1cd009d View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. [fix] [cli] the variable producerName of BatchMsgContainer is null (a…

    …pache#20819)
    
    Motivation: If the producer name is generated by the Broker, the producer will update the variable `producerName` after connecting, but not update the same variable of the batch message container.
    
    Modifications: fix bug
    (cherry picked from commit aba50f2)
    poorbarcode committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    4dae6cb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a894af View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. Configuration menu
    Copy the full SHA
    1eb5eb3 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2023

  1. Configuration menu
    Copy the full SHA
    fea2f9b View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2023

  1. Configuration menu
    Copy the full SHA
    6d321e1 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Configuration menu
    Copy the full SHA
    ebf9961 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2023

  1. [fix][broker] In replication scenario, remote consumer could not be r…

    …egistered if there has no message was sent (apache#20888)
    
    Motivation: In the replication scenario, we want to produce messages on the native cluster and consume messages on the remote cluster, the producer and consumer both use a same schema, but the consumer cannot be registered if there has no messages in the topic yet.The root cause is that for the remote cluster, there is a producer who has been registered with `AUTO_PRODUCE_BYTES` schema, so there is no schema to check the compatibility.
    
    Modifications: If there is no schema and only the replicator producer was registered, skip the compatibility check.
    (cherry picked from commit 9be0b52)
    poorbarcode committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    54359b6 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2023

  1. [fix] [ml] fix discontinuous ledger deletion (apache#20898)

    - The task `trim ledgers` runs in the thread `BkMainThreadPool.choose(ledgerName)`
    - The task `write entries to BK` runs in the thread `BkMainThreadPool.choose(ledgerId)`
    
    So the two tasks above may run concurrently/
    
    The task `trim ledgers` work as the flow below:
    - find the ledgers which are no longer to read, the result is `{Ledgers before the slowest read}`.
    - check if the `{Ledgers before the slowest read}` is out of retention policy, the result is `{Ledgers to be deleted}`.
      - if the create time of the ledger is lower than the earliest retention time, mark it should be deleted
      - if after deleting this ledger, the rest ledgers are still larger than the retention size, mark it should be deleted
    - delete the`{Ledgers to be deleted}`
    
    **(Highlight)** There is a scenario that causes the task `trim ledgers` did  discontinuous ledger deletion, resulting consume messages discontinuous:
    - context:
      - ledgers: `[{id=1, size=100}, {id=2,size=100}]`
      - retention size: 150
      - no cursor there
    - Check `ledger 1`, skip by retention check `(200 - 100) < 150`
    - One in-flight writing is finished, the `calculateTotalSizeWrited()` would return `300` now.
    - Check `ledger 2`, retention check `(300 - 100) > 150`, mark the ledger-2 should be deleted.
    - Delete the `ledger 2`.
    - Create a new consumer. It will receive messages from `[ledger-1, ledegr-3]`, but the `ledger-2` will be skipped.
    
    Once the retention constraint has been met, break the loop.
    
    (cherry picked from commit 782e91f)
    poorbarcode committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    ea16fb8 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2023

  1. [branch-2.10] Remove cpp tests

    The C++ and Python clients are not maintained in the main repo now.
    BewareMyPower committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    b0e2c0a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31d59cf View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. Configuration menu
    Copy the full SHA
    691804b View commit details
    Browse the repository at this point in the history