Opened 18 months ago
Last modified 11 months ago
#23258 new defect
[PATCH] JCSCacheManager locks the wrong directory
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | |
Keywords: | cache JCS | Cc: |
Description
In org.openstreetmap.josm.data.cache.JCSCacheManager
the cache manager always acquires a lock on the <cachedir>/jcs
directory regardless of the cachePath
passed to the getCache
function. In normal use this doesn't matter.
When unit-testing this prevents tests like JCSCacheManagerTest::testUseBigDiskFile
to run concurrently with other tests, notwithstanding that this test uses a different cache directory of foobar
and should thus be able to acquire a lock on this directory.
Attachments (1)
Change History (4)
by , 18 months ago
Attachment: | 23258.patch added |
---|
comment:1 by , 18 months ago
Summary: | JCSCacheManager locks the wrong directory → [PATCH] JCSCacheManager locks the wrong directory |
---|
comment:2 by , 18 months ago
I'm actually wondering if we need the file lock still -- we use JCS, and there have been many updates to it since that code was originally written back in 2015 (see #11312/r8186). ImageryCache has been in core since r8772, so the original reason for that code is no longer relevant as well.
A brief test did not show that it was still necessary.
comment:3 by , 11 months ago
Keywords: | cache JCS added |
---|
patch