-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Optimize built-in source/sink startup Part 2 #9500
Optimize built-in source/sink startup Part 2 #9500
Conversation
…packing and checksum calculation Part 2. Allow ThreadRuntime to used cached built-in connectors instead of unpacking and loading again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fnCache.unregisterFunctionInstance( | ||
instanceConfig.getFunctionId(), | ||
instanceConfig.getInstanceName()); | ||
log.info("Unloading JAR files for function {}", instanceConfig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to move this line one line above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
LGTM +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fnClassLoader = fnCache.getClassLoader(instanceConfig.getFunctionId()); | ||
if (null == fnClassLoader) { | ||
throw new Exception("No function class loader available."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this null check goes before the log.info
on line 145 to avoid confusion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the existing logic. I rather not change it in this PR. It is kind of out of scope.
Great! Thanks |
* Optimize built-in source/sink startup by eliminating redundant NAR unpacking and checksum calculation Part 2. Allow ThreadRuntime to used cached built-in connectors instead of unpacking and loading again. Co-authored-by: Jerry Peng <jerryp@splunk.com>
Motivation
As a follow up to #9413. Allow the ThreadRuntime to leverage the already loaded and cached built-in connector registry so that it does not need to unpack NARs and calculate MD5 checksums as well.
Modifications