You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "heesung-sn (via GitHub)" <gi...@apache.org> on 2023/05/19 19:22:20 UTC

[GitHub] [pulsar] heesung-sn opened a new pull request, #20361: [fix][broker] managedLedger.getConfig().getProperties().putAll(properties) NPE

heesung-sn opened a new pull request, #20361:
URL: https://github.com/apache/pulsar/pull/20361

   
   
   <!--
   ### Contribution Checklist
     
     - PR title format should be *[type][component] summary*. For details, see *[Guideline - Pulsar PR Naming Convention](https://pulsar.apache.org/contribute/develop-semantic-title/)*. 
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   -->
   
   
   <!-- Details of when a PIP is required and how the PIP process work, please see: https://github.com/apache/pulsar/blob/master/wiki/proposals/PIP.md -->
   
   ### Motivation
   
   Old topics/ledgers before https://github.com/apache/pulsar/pull/12818 can have null ManagedLedgerConfig.properties.
   
   ```
   hsohn@HeesungSohns-MacBook-Pro sn-pulsar % curl --location --request PUT 'http://localhost:8080/admin/v2/persistent/my-tenant/my-namespace-1/my-topic-11/properties' \
   --header 'Authorization: Bearer <REDACTED>' \
   --header 'Content-Type: application/json' \
   --data-raw '{
   "api_name_one": "test4"
   }'
   
   An unexpected error occurred in the server ---
   
   Message: java.util.concurrent.CompletionException: java.lang.NullPointerException
   
   Stacktrace:
   
   org.apache.bookkeeper.mledger.ManagedLedgerException$MetaStoreException: java.util.concurrent.CompletionException: java.lang.NullPointerException
   Caused by: java.util.concurrent.CompletionException: java.lang.NullPointerException
   \tat java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
   \tat java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
   \tat java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
   \tat java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
   \tat org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203)
   \tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
   \tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   \tat java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
   \tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   \tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   \tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   \tat java.base/java.lang.Thread.run(Thread.java:829)
   Caused by: java.lang.NullPointerException
   \tat org.apache.pulsar.broker.admin.impl.PersistentTopicsBase$1.updatePropertiesComplete(PersistentTopicsBase.java:692)
   \tat org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl$25.operationComplete(ManagedLedgerImpl.java:4071)
   \tat org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl$25.operationComplete(ManagedLedgerImpl.java:4067)
   \tat org.apache.bookkeeper.mledger.impl.MetaStoreImpl.lambda$asyncUpdateLedgerIds$7(MetaStoreImpl.java:161)
   \tat java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
   \t... 9 more
   "}%
   ```
   
   ### Modifications
   
   Added a null check when adding new properties upon `managedLedger.getConfig().getProperties().putAll(properties) `
   
   <!-- Describe the modifications you've done. -->
   
   ### 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: <!-- 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.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] nodece commented on pull request #20361: [fix][broker] managedLedger.getConfig().getProperties().putAll(properties) NPE

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece commented on PR #20361:
URL: https://github.com/apache/pulsar/pull/20361#issuecomment-1555891956

   /pulsarbot rerun-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] codecov-commenter commented on pull request #20361: [fix][broker] managedLedger.getConfig().getProperties().putAll(properties) NPE

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #20361:
URL: https://github.com/apache/pulsar/pull/20361#issuecomment-1555895686

   ## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/20361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#20361](https://app.codecov.io/gh/apache/pulsar/pull/20361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (581833a) into [master](https://app.codecov.io/gh/apache/pulsar/commit/5d5ec947249df50bf35a78b6a2a0d3b00d97ca66?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (5d5ec94) will **increase** coverage by `34.96%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/20361/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/pulsar/pull/20361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #20361       +/-   ##
   =============================================
   + Coverage     37.92%   72.89%   +34.96%     
   - Complexity    12694    31857    +19163     
   =============================================
     Files          1691     1864      +173     
     Lines        129047   138321     +9274     
     Branches      14070    15173     +1103     
   =============================================
   + Hits          48942   100828    +51886     
   + Misses        73777    29482    -44295     
   - Partials       6328     8011     +1683     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | inttests | `24.14% <0.00%> (-0.04%)` | :arrow_down: |
   | systests | `25.00% <0.00%> (-0.19%)` | :arrow_down: |
   | unittests | `72.17% <0.00%> (+38.71%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/pulsar/pull/20361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...pulsar/broker/admin/impl/PersistentTopicsBase.java](https://app.codecov.io/gh/apache/pulsar/pull/20361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi9pbXBsL1BlcnNpc3RlbnRUb3BpY3NCYXNlLmphdmE=) | `64.29% <0.00%> (+51.65%)` | :arrow_up: |
   
   ... and [1430 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/20361/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] heesung-sn commented on pull request #20361: [fix][broker] managedLedger.getConfig().getProperties().putAll(properties) NPE

Posted by "heesung-sn (via GitHub)" <gi...@apache.org>.
heesung-sn commented on PR #20361:
URL: https://github.com/apache/pulsar/pull/20361#issuecomment-1555151640

   @liangyepianzhou PTAL.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] nodece merged pull request #20361: [fix][broker] managedLedger.getConfig().getProperties().putAll(properties) NPE

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece merged PR #20361:
URL: https://github.com/apache/pulsar/pull/20361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org