#13128 closed defect (fixed)
JCS WMS TileCache not used if JOSM is run offline
Reported by: | cmuelle8 | Owned by: | wiktorn |
---|---|---|---|
Priority: | normal | Milestone: | 16.07 |
Component: | Core imagery | Version: | latest |
Keywords: | imagery wms jcs tile cache offline | Cc: |
Description
If there is no network connection, or if the WMS host is unavailable/unreachable,
WMS layer shows "error" tiles instead of cached tiles.
Expected behavior:
- Only try to update cached tile, if network and host is actually available.
- Show cached tile, if available in cache.
In addition it would be nice to have mbtiles import/export function under Settings (F12) > WMS Panel > Cache Contents. But this is just nice to have, while above is crucial, imho.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2016-07-10 01:08:07 +0200 (Sun, 10 Jul 2016) Build-Date:2016-07-10 01:32:29 Revision:10523 Relative:URL: ^/trunk Identification: JOSM/1.5 (10523 de) Linux No LSB modules are available. Memory Usage: 518 MB / 1820 MB (126 MB allocated, but free) Java version: 1.8.0_91-b14, Oracle Corporation, OpenJDK 64-Bit Server VM Dataset consistency test: No problems found Plugins: - PicLayer (32329) - RoadSigns (32309) - apache-commons (32309) - editgpx (32309) - jogl (1.0.46) - kendzi3d (1.0.190.1) - kendzi3d-resources (0.0.1) - log4j (32309) - measurement (32324) - openvisible (32309) - pbf (32309) - photo_geotagging (32326) - photoadjust (32329) - poly (32309) - print (32309) - reverter (32309) - turnlanes (32309) - turnrestrictions (32386) - undelete (32309) - utilsplugin2 (32333) - wikipedia (32627)
Attachments (0)
Change History (15)
comment:1 by , 8 years ago
Owner: | changed from | to
---|
comment:2 by , 8 years ago
comment:4 by , 8 years ago
This causes a unit test failure: jenkins/job/JOSM/1539/jdk=JDK8/testReport/org.openstreetmap.josm.data.cache/JCSCachedTileLoaderJobTest/testUnknownHost/
comment:6 by , 8 years ago
Confirmed working, thanks.
Seems to be just a minor glitch left,
concerning maximum size of WMS cache data file,
to reproduce please do:
- adjust wms cache size (e.g. 10240 instead of 512) in settings
- fill the cache, confirm the file growing >512m on disk
- quit JOSM
- clear configuration
- start JOSM
- now only a fraction (supposedly first 512m) of the cached data is used
- file is _not_ shrunk (which is expected from a user perspective)
If settings are changed thus that wms cache size uses previous value, then after restart full cache contents are used (and reported about in stats tab).
IMHO, we should not deduct and change the default settings value, when a larger cache file exists at startup. Rather do a max(file_size_on_disk, setting_size_configured)
to determine the cache size to use for the session.
In any case, shrinking the cache file on disk should only be done, if user actively decreases value in settings tab (maybe with warning prior to doing so).
Thanks again for the quick fix,
I did expect the bug to linger longer in trac..
comment:7 by , 8 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Indeed, that's something we can do. As JCS will not shrink the file anyway, we could use the whole file, if it's larger than what we have configured.
comment:9 by , 8 years ago
Milestone: | → 16.07 |
---|
follow-ups: 11 12 comment:10 by , 8 years ago
How does it solve the bug? maxDiskObjects is not used later in the code.
comment:11 by , 8 years ago
Replying to Don-vip:
How does it solve the bug? maxDiskObjects is not used later in the code.
Maybe the code block was meant to go before source:trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java@10562#L174 ?
Here only rev10558 was tested ok, which solved main problem of this bug.
comment:12 by , 8 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to Don-vip:
How does it solve the bug? maxDiskObjects is not used later in the code.
Good catch. I'll fix this later today.
I disconnected my network and I was able to see the map without a problem.
Can you tell me which Imagery Provider did you use?
Anyway - I've added MbTiles as an additional tab in preferences in MbTiles plugin. You can track this here:
https://github.com/iandees/josm-mbtiles/pull/10