Skip to content
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

'bulk_meta_tiles' does not work for 'sqlite' caches #928

Closed
xdml opened this issue May 15, 2024 · 2 comments
Closed

'bulk_meta_tiles' does not work for 'sqlite' caches #928

xdml opened this issue May 15, 2024 · 2 comments

Comments

@xdml
Copy link
Contributor

xdml commented May 15, 2024

Context

When enabled bulk_meta_tiles mapproxy resulted in error for sqlite caches. The error follows:

TypeError: MBTilesLevelCache.store_tiles() missing 1 required positional argument: 'dimensions'

Expected Behavior

Just works with enabled bulk_meta_tiles for sqlite caches.

Actual Behavior

Cannot use bulk_meta_tiles.

Possible Fix

Check _create_bulk_meta_tile(self, meta_tile) in mapproxy/mapproxy/cache/tile.py and possibly fix incorrect calling of:

self.cache.store_tiles([t for t in tiles if t.cacheable])

as dimensions argument is missing.

Not sure, if it can be fixed by:

self.cache.store_tiles([t for t in tiles if t.cacheable], dimensions=self.dimensions)

as I do not have deep knowledge about mapproxy insides.

Steps to Reproduce

  1. Configure tiled source cache with sqlite storage type
  2. Configure meta_size: [5, 5] in globals: cache:
  3. Configure bulk_meta_tiles: true in globals: cache:
  4. Try to access any configured service

Context

Want to use sqlite storage type, as I have issues with file storage type (too many small files, try to reduce inode usage).

Your Environment

  • Version used: 1.15.1 (debian package)
  • Environment name and version (e.g. Python 2.7.5 with mod_wsgi 4.5.9): Python 3.11.2 with gunicorn 20.1.0 (both debian packages)
  • Server type and version: LXC container
  • Operating System and version: Debian GNU/Linux 12 (bookworm)

Even if I do not use mapproxy installed from pip, it looks this issue still exists in the code.

@xdml
Copy link
Contributor Author

xdml commented Jun 2, 2024

Seeding not working as well if using sqlite cache.

TypeError: MBTilesLevelCache.load_tile_metadata() missing 1 required positional argument: 'dimensions'

@simonseyock
Copy link
Contributor

thanks for reporting and fixing this @xdml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants