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

fix: sets ResourceHandler to not use filemapping, avoids win file locking #632

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

chipbite
Copy link
Contributor

@chipbite chipbite commented Nov 1, 2024

After some digging (older solutions involved e g useFileMappedBuffer or for ResourceHandler it was setting setMinMemoryMappedContentLength to -1, now deprecated) I found that after this discussion, ResourceHandler got a flag for using file mapping in jetty version 12.0.5 (jetty PR).

So, its a oneliner. Took a few hours to dig it up, TBH.

Tested?

Yeah, on windows. Seems to work a charm. Sooo nice to not have it crash all the time.

However, I dont have access to a mac here. Guessing it will be fine, but nice to check... ;-)

This fixes #549.

@chipbite
Copy link
Contributor Author

chipbite commented Nov 4, 2024

Ping @dirkgroot @jp7677 .
A oneliner jetty configuration change PR, for the windows locking issue that crashes generatr (#549).

@chipbite chipbite changed the title Sets ResourceHandler to not use filemapping, avoids win file locking fix: sets ResourceHandler to not use filemapping, avoids win file locking Nov 5, 2024
@jenspav
Copy link
Collaborator

jenspav commented Nov 5, 2024

Thanks for diving into this. serve still works on a Linux machine. so LGTM!
Not having tested mac explicitly, but lets assume (famous last words) that the behavior is the same as Linux.

@jenspav jenspav merged commit 3ab155d into avisi-cloud:main Nov 5, 2024
2 checks passed
@chipbite chipbite deleted the Fix_for_jetty_locking_on_windows branch November 5, 2024 12:21
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.

Serve watch throws java.io.FileNotFoundException on update (windows)
3 participants