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

Retry locked mbtiles files #1591

Open
Krizz opened this issue Nov 18, 2024 · 5 comments
Open

Retry locked mbtiles files #1591

Krizz opened this issue Nov 18, 2024 · 5 comments
Labels
good first issue help wanted mbtiles Anything related to Martin's MBTiles support

Comments

@Krizz
Copy link
Contributor

Krizz commented Nov 18, 2024

Currently Martin stops in case of corrupt tile file or when tile file is in use (being created by tippecanoe).
It would be better to console log this as a warning, ignore the tile and continue running the tile server.

@CommanderStorm

This comment has been minimized.

@CommanderStorm
Copy link
Collaborator

Update: I reproduced this via the example file from https://docs.mapbox.com/help/glossary/mbtiles/ (have submitted feedback about this, no need to report this to them)

Image

@nyurik In case of an unrecoverable permanent error like this, failing obvious is better imo => what do you think?

@nyurik
Copy link
Member

nyurik commented Nov 26, 2024

Thx for tracking it down! I agree that early failure is preferred, rather than having the service come up but unable to serve from one of its services. Note that this is different from the sporadic issues, e.g. network connection going down to a database or network issue with pmtiles - i.e. if we have a chance to recover later. I do think all sources should function during startup... Unless we want to introduce --allow-unavailable-sources ?

@CommanderStorm
Copy link
Collaborator

CommanderStorm commented Nov 26, 2024

Let's not add this complexity for corrupted mbtiles files.

For locked ones though, I think retrying like proposed in this PR would be reasonable/preferale

This is what is currently looks like:
Image

@CommanderStorm CommanderStorm changed the title Ignore corrupt/in use tiles. Retry locked mbtiles files Nov 26, 2024
@CommanderStorm CommanderStorm added help wanted good first issue mbtiles Anything related to Martin's MBTiles support and removed question labels Nov 26, 2024
@Krizz
Copy link
Contributor Author

Krizz commented Nov 26, 2024

My use case is that I am generating a bunch of tiles dynamically while the app is already running. Ideally Martin would watch the directory and load the source when it is available and not corrupt (watch mode).

Validating every source and stopping Martin from starting seems a bit too strict to me. For example a web server/Plex/Winamp etc. will still start even if you have a corrupt file (source) in the directory that is being served.

I understand that early failure might be a design decision for Martin and my use case is out of scope - in that case I can just figure out a workaround or fork the code. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue help wanted mbtiles Anything related to Martin's MBTiles support
Projects
None yet
Development

No branches or pull requests

3 participants