-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Restructure vertx-cache to allow multiple applications with launched by multiple users #15541
Restructure vertx-cache to allow multiple applications with launched by multiple users #15541
Conversation
…table. Under that directory, another random directory is created that is only readable and writable from the current user. The vertx-cache directory creation is disabled if: * the user specifies a cache directory * the vertx-cache directory already exists Fix quarkusio#7678
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.
Tried on macOS and on Windows, in both JVM and Native mode. Using GraalVM 20.0.0.2 JDK 11 based.
Directory listing from Windows:
Directory of c:\Users\Rostislav\AppData\Local\Temp\vertx-cache
08.03.2021 19:39 <DIR> .
08.03.2021 19:39 <DIR> ..
08.03.2021 19:39 <DIR> -1470934000943740825
08.03.2021 18:18 <DIR> -3024270797316995263
08.03.2021 18:53 <DIR> -3474816208713856604
08.03.2021 18:53 <DIR> -4254873161419174401
08.03.2021 19:39 <DIR> -6232826564929696508
08.03.2021 19:39 <DIR> 1012173164788925745
08.03.2021 18:17 <DIR> 1716656712433746412
08.03.2021 18:17 <DIR> 3517666954089023773
08.03.2021 18:16 <DIR> 7645099081770877049
08.03.2021 18:53 <DIR> 7893496767166432346
08.03.2021 18:51 <DIR> 8969940024877338545
The only concern I have is the set of empty directories under vertx-cache
.
Can be something done about it or it is up to system admins to make sure tmp is cleaned / container is thrown away?
@rsvoboda The previous approach was not deleting the directory either, but I agree, better cleaning if we have created the directory. We won't clean if it's a directory set by the user (because it would reuse it during the next execution, and so would allow avoiding copying files over). |
Agree, I will file new GH issue for directory removal. GH issue: #15566 |
@rsvoboda I updated the PR to clean up the directory on shutdown. |
Any chance we could avoid negative numbers as directory names? It's a bit weird to have the directory starting with It's a detail, we can live with it but if there's an easy fix... |
Yes, I can make sure the random is positive. Let me fix that. |
* make sure it does not exist * avoid negative numbers
@gsmet I used my awesome mathematic background to avoid negative numbers. |
I have checked new addition on both Windows and macOS and it works nicely, both JVM and native mode. |
Create /tmp/vertx-cache and configure it to be world-readable and writable.
Under that directory, another random directory is created that is only readable and writable from the current user (which is used by the application)).
The vertx-cache directory creation is disabled if:
Fix #7678