Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Improve tile handler's cache cleanup #342

Closed
data-sync-user opened this issue Jan 6, 2022 · 0 comments · Fixed by #351
Closed

Improve tile handler's cache cleanup #342

data-sync-user opened this issue Jan 6, 2022 · 0 comments · Fixed by #351
Assignees

Comments

@data-sync-user
Copy link
Collaborator

data-sync-user commented Jan 6, 2022

In PR #250 we complicated the tiles handler by adding a cleanup section to reset the tile cache state if any errors occurred. We ended up wrapping the work of the function where potential errors might occur in a closure, basically emulating a "try finally" block.

This was a quick fix with the intention that we improve it later. There's also a TODO (comment) that this solution doesn't handle the cache cleanup on potential panics.

The scopeguard crate offers what looks like an easy way to solve this instead, adding a Go-like defer macro that additionally works for panics.

┆Issue is synchronized with this Jira Task
┆epic: Contile production v1

pjenvey added a commit that referenced this issue Feb 1, 2022
and kill TilesCache's Deref to dashmap, since we now only expose get and insert
outside of the cache module

Closes #342
pjenvey added a commit that referenced this issue Feb 2, 2022
and kill TilesCache's Deref to dashmap, since we now only expose get and insert
outside of the cache module

Closes #342
jrconlin added a commit that referenced this issue Feb 4, 2022
and kill TilesCache's Deref to dashmap, since we now only expose get and insert
outside of the cache module

Closes #342

Co-authored-by: JR Conlin <jr+git@mozilla.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants