Modify

Opened 7 months ago

Last modified 4 days ago

#23258 new defect

[PATCH] JCSCacheManager locks the wrong directory

Reported by: marcello@… 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)

23258.patch (5.2 KB ) - added by marcello@… 7 months ago.
patch

Download all attachments as: .zip

Change History (4)

by marcello@…, 7 months ago

Attachment: 23258.patch added

patch

comment:1 by marcello@…, 7 months ago

Summary: JCSCacheManager locks the wrong directory[PATCH] JCSCacheManager locks the wrong directory

comment:2 by taylor.smock, 7 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 gaben, 4 days ago

Keywords: cache JCS added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to marcello@….
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.