Emtpy Vertx File Cache folders

796 views
Skip to first unread message

Terry Bleger

unread,
Jun 29, 2015, 12:31:04 PM6/29/15
to ve...@googlegroups.com
Hi,

I'm getting a lot of empty .vertx/file-cache-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx folder everytime I ran my project. What and why is that?

Thomas SEGISMONT

unread,
Jun 29, 2015, 2:15:57 PM6/29/15
to ve...@googlegroups.com
I've noticed the same thing. The directories are created in io.vertx.core.impl.FileResolver. The Javadoc says they should be deleted on exit but they aren't.

Any reason not to use the temp directory as parent by default?



2015-06-29 18:31 GMT+02:00 Terry Bleger <terry...@gmail.com>:
Hi,

I'm getting a lot of empty .vertx/file-cache-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx folder everytime I ran my project. What and why is that?

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Fox

unread,
Jun 29, 2015, 2:30:29 PM6/29/15
to ve...@googlegroups.com
On 29/06/15 19:15, Thomas SEGISMONT wrote:
I've noticed the same thing. The directories are created in io.vertx.core.impl.FileResolver. The Javadoc says they should be deleted on exit but they aren't.

Do you have a reproducer that demonstrates them not being deleted?

I know there was a bug in earlier 3.0.0 snapshots but that should be resolved in the actual 3.0 release



Any reason not to use the temp directory as parent by default?

We used the system temp dir in Vert.x 2 and it was problematic. E.g. some Linux distros (e.g. RHEL?) by default have cron jobs which deleted tmp dir every day, which ended up with peoples servers just mysteriously stopping.

Thomas SEGISMONT

unread,
Jun 29, 2015, 4:20:59 PM6/29/15
to ve...@googlegroups.com
2015-06-29 20:30 GMT+02:00 Tim Fox <timv...@gmail.com>:
On 29/06/15 19:15, Thomas SEGISMONT wrote:
I've noticed the same thing. The directories are created in io.vertx.core.impl.FileResolver. The Javadoc says they should be deleted on exit but they aren't.

Do you have a reproducer that demonstrates them not being deleted?

I know there was a bug in earlier 3.0.0 snapshots but that should be resolved in the actual 3.0 release


It happens whenever I run ptrans integration tests. I'll try to build a test case.
 


Any reason not to use the temp directory as parent by default?

We used the system temp dir in Vert.x 2 and it was problematic. E.g. some Linux distros (e.g. RHEL?) by default have cron jobs which deleted tmp dir every day, which ended up with peoples servers just mysteriously stopping.


OK.

Thomas SEGISMONT

unread,
Jun 30, 2015, 4:20:53 AM6/30/15
to ve...@googlegroups.com
My bad, in test code a Vert.x instance was created but not closed properly. This explains why the cacheDir was not deleted.

How about skipping cacheDir creation when classpath resolving is disabled? It looks like it's not used in this case. Also, it would be nice to make the cacheDir parent directory configuration (CWD in 3.0.0).


Terry Bleger

unread,
Jun 30, 2015, 8:13:11 AM6/30/15
to ve...@googlegroups.com
Yeah Thomas was right. When using IDE (debugging, etc), cacheDir was never deleted because the vertx instance was never closed properly.

Tim Fox

unread,
Jul 2, 2015, 6:07:41 AM7/2/15
to ve...@googlegroups.com
On 30/06/15 09:20, Thomas SEGISMONT wrote:
My bad, in test code a Vert.x instance was created but not closed properly. This explains why the cacheDir was not deleted.

How about skipping cacheDir creation when classpath resolving is disabled? It looks like it's not used in this case.

Sounds reasonable, I will investigate.

We should also consider using runtime hooks to delete the cache dirs - this should avoid the case where the JVM was stopped without first stopping vert.x (unless the JVM is hard killed) and the dir wasn't deleted.

Could you add a BZ for this so we don't forget?

Also, it would be nice to make the cacheDir parent directory configuration (CWD in 3.0.0).



2015-06-29 22:20 GMT+02:00 Thomas SEGISMONT <tsegi...@gmail.com>:


2015-06-29 20:30 GMT+02:00 Tim Fox <timv...@gmail.com>:
On 29/06/15 19:15, Thomas SEGISMONT wrote:
I've noticed the same thing. The directories are created in io.vertx.core.impl.FileResolver. The Javadoc says they should be deleted on exit but they aren't.

Do you have a reproducer that demonstrates them not being deleted?

I know there was a bug in earlier 3.0.0 snapshots but that should be resolved in the actual 3.0 release


It happens whenever I run ptrans integration tests. I'll try to build a test case.
 


Any reason not to use the temp directory as parent by default?

We used the system temp dir in Vert.x 2 and it was problematic. E.g. some Linux distros (e.g. RHEL?) by default have cron jobs which deleted tmp dir every day, which ended up with peoples servers just mysteriously stopping.


OK.

Thomas SEGISMONT

unread,
Jul 2, 2015, 6:44:59 AM7/2/15
to ve...@googlegroups.com
2015-07-02 12:07 GMT+02:00 Tim Fox <timv...@gmail.com>:
On 30/06/15 09:20, Thomas SEGISMONT wrote:
My bad, in test code a Vert.x instance was created but not closed properly. This explains why the cacheDir was not deleted.

How about skipping cacheDir creation when classpath resolving is disabled? It looks like it's not used in this case.

Sounds reasonable, I will investigate.

We should also consider using runtime hooks to delete the cache dirs - this should avoid the case where the JVM was stopped without first stopping vert.x (unless the JVM is hard killed) and the dir wasn't deleted.

Could you add a BZ for this so we don't forget?

Tim Fox

unread,
Jul 2, 2015, 12:16:22 PM7/2/15
to ve...@googlegroups.com
Thomas,

I've added a PR for these changes:

https://github.com/eclipse/vert.x/pull/1095

Could you review?
Reply all
Reply to author
Forward
0 new messages