Repository navigation
Conversation
aymkhalil
force-pushed
the
parallel-search-connectors
branch
from
September 28, 2022 22:29
b2697aa to
9e3ce0a
Compare
eolivelli
suggested changes
Sep 29, 2022
|
|
||
| private static final String PULSAR_IO_SERVICE_NAME = "pulsar-io.yaml"; | ||
|
|
||
| private static final Executor cachedThreadPool = Executors.newCachedThreadPool(); |
There was a problem hiding this comment.
We have to control the life cycle of this ThreadPool
leaving a static ThreadPool is generally a not a good practice.
In this case we can create the ThreadPool and dispose it in searchForConnectors.
Also I would use a fixed size threadpool, otherwise we have to control on the parallelism
There was a problem hiding this comment.
we should also provide a meaningful name to the threads
aymkhalil
force-pushed
the
parallel-search-connectors
branch
2 times, most recently
from
September 30, 2022 01:36
91ef086 to
f95834c
Compare
1 of 13 tasks
Co-authored-by: leolinchen <[email protected]>
…w and Qa. (apache#18003) * [improve][docs] Improve docs for Bookkeeper E, Qw and Qa.
* [improve][misc] Highlight change to threading Whenever a PR changes the threading model we need to make clear that we should track these changes * Fix typo
…ache#18024) Co-authored-by: huangzegui <[email protected]>
…nnel inactive (apache#17856) ### Motivation https://github.com/apache/pulsar/blob/b89c1451551a6bbe681465726906a2e61c9d8a69/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L282-L297 The `pendingLookupRequestSemaphore` will leak when channel inactive. There are `LookUpRequestSemaphore` not released when removing it from `pendingRequests` ### Modifications We can't easily release the semaphore in `channelInactive`, because there are not only `LookUpRequest`. So release the semaphore when connectionException ### Verifying this change Add unit test case to cover this change ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [x] `doc-not-needed` bug fixs, no need doc - [ ] `doc` (Your PR contains doc changes) - [ ] `doc-complete` (Docs have been already added)
…pache#16045) * [fix][proxy] Use correct channel for HAProxyMessage dest address * Fix implementation after researching HAProxy ### Motivation When reading through the Proxy code, I noticed that the `remoteAddress` was used where it probably makes sense to use the `localAddress`. After researching it a bit with the AWS docs https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html and the protocol spec http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt, I think this implementation is correct. We could look at using the value in the broker logs if we wanted to make it clear which proxy the traffic is ingressing through. For now, I propose we just fix the code in the proxy. ### Modifications * Replace `inboundChannel.localAddress` with `inboundChannel.localAddress`. * Fix type checking - [x] `doc-not-needed`
) When using KubernetesRuntime, if uploadBuiltinSinksSources is false (non-default), the originalFileName is not set for builtin components. But with k8s, we need a filename since the component will be downloaded. This results in the component currently being downloaded with the download directory as filename. Also when using a transform function, we use the originalFileName to know if there's a builtin function to download.
Error message is: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
…e#17922) * Make BookieId work with PulsarRegistrationDriver (apache#17762) * Make BookieId work with PulsarRegistrationDriver * Switch to MetadataCache * checkstyle * Do not execute lookup on MetadataCache in the getBookieServiceInfo caller thread
…bug. (apache#17992) Co-authored-by: druidliu <[email protected]>
…reduce the execution time (apache#18039)
…nectors thread pool
…ns/utils/io/ConnectorUtils.java Co-authored-by: Lari Hotari <[email protected]>
Technoboy-
force-pushed
the
parallel-search-connectors
branch
from
October 17, 2022 03:53
595f79b to
6f99bb6
Compare
|
The pr had no activity for 30 days, mark with Stale label. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Improve functions worker bootstrap time with increased number of connectors. Currently all nar files are unpacked during startup to perform validation steps (e.g. if the connector class implements the correct interfaces). For that, the NarClassLoader will unpack all nars to disk sequentially which could delay startup.
On my Machine (Mac M1) I observed an improvement of ~ 3X (from 48 seconds down to 15 seconds). I know the max number of chosen threads (4) is a magic number (I have not seen improvements beyond that number), but if this is the right approach and it is worth it, we can make this number configurable (need guidance on the right config place)
Sample output:
Modifications
Just run the connectors search function (which unpacks the nars) in parallel via a CachedThreadPool.
Verifying this change
This change is already covered by existing tests, such as the unit tests under PulsarFunctionLocalRunTest already covers this path. Also CI for each existing connector will cover the change
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc-required(Your PR needs to update docs and you will update later)
doc-not-needed(Please explain why)
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)
Matching PR in forked repository
PR in forked repository: (#2)
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.
-->