Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[broker] Reduce the time it takes for namespace bundle unloading to time out #12995

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

massakam
Copy link
Contributor

@massakam massakam commented Nov 27, 2021

Motivation

When the bug that has been fixed in #12993 occurred, the topic was unavailable for 5 minutes until the namespace bundle unloading timed out.

2021-11-26T21:45:07,455+0900 [BookKeeperClientWorker-OrderedExecutor-4-0] ERROR org.apache.bookkeeper.common.util.SafeRunnable - Unexpected throwable caught
java.lang.NullPointerException: null
        at org.apache.bookkeeper.mledger.impl.OpAddEntry.addComplete(OpAddEntry.java:148) ~[managed-ledger.jar:2.10.0-SNAPSHOT]
        at org.apache.bookkeeper.client.AsyncCallback$AddCallback.addCompleteWithLatency(AsyncCallback.java:92) ~[bookkeeper-server-4.14.3.jar:4.14.3]
        at org.apache.bookkeeper.client.PendingAddOp.submitCallback(PendingAddOp.java:431) ~[bookkeeper-server-4.14.3.jar:4.14.3]
        at org.apache.bookkeeper.client.LedgerHandle.errorOutPendingAdds(LedgerHandle.java:1799) ~[bookkeeper-server-4.14.3.jar:4.14.3]
        at org.apache.bookkeeper.client.LedgerHandle$5.safeRun(LedgerHandle.java:574) ~[bookkeeper-server-4.14.3.jar:4.14.3]
        at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [bookkeeper-common-4.14.3.jar:4.14.3]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_312]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_312]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.68.Final.jar:4.1.68.Final]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]

...

2021-11-26T21:50:07,454+0900 [pulsar-io-18-9] WARN  org.apache.pulsar.broker.service.BrokerService - Unloading of public/default/0x00000000_0x40000000 has timed out

I think 5 minutes is too long, but this value is hard-coded and we can't change it.

return unloadNamespaceBundle(bundle, 5, TimeUnit.MINUTES);

Modifications

Make it possible to change the time to wait for unloading of a namespace bundle. The default value is 1 minute.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

  • doc

@massakam massakam added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. area/broker labels Nov 27, 2021
@massakam massakam added this to the 2.10.0 milestone Nov 27, 2021
@massakam massakam self-assigned this Nov 27, 2021
@merlimat merlimat merged commit 0715fcd into apache:master Nov 29, 2021
@massakam massakam deleted the ns-unloading-timeout branch November 30, 2021 01:21
fxbing pushed a commit to fxbing/pulsar that referenced this pull request Dec 19, 2021
dragonls pushed a commit to dragonls/pulsar that referenced this pull request Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker area/config doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants