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

[docker] Do not close classloaders, to prevent spammy ClassNotFoundExceptions #656

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

eolivelli
Copy link
Member

When the docker container is existing, usually due to an error in the configuration, we close the classloaders and this triggers a lot of spammy ClassNotFound errors that are misleading, because users think that there is a bug somewhere in LangStream.

The trick here is not not close them: the JMV is existing, there is no risk of leaking resources.
Also the tmp directory of the container is ephemeral: we are not leaving dangling temporary files

Boolean.parseBoolean(System.getProperty("langstream.nar.closeClassloaders", "true"));

static {
log.info("langstream.nar.close-classloaders = {}", CLOSE_CLASSLOADERS);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please align to the system property name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@eolivelli eolivelli force-pushed the imp/docker-not-close-classloaders branch from 2c71528 to 8f67bf1 Compare October 27, 2023 14:11
@eolivelli eolivelli merged commit 498e822 into main Oct 27, 2023
8 of 10 checks passed
@eolivelli eolivelli deleted the imp/docker-not-close-classloaders branch October 27, 2023 14:27
benfrank241 pushed a commit to vectorize-io/langstream that referenced this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants