unparseable synapse cacheMap raises JSONDecodeError

Description

If a cacheMap file is corrupt and contains invalid JSON an attempt to (re)download the file from Synapse raises a JSONDecodeError, aborting the download.

A corrupt cache entry on the local file system could be caused by a number of issues out of the control of the Synapse client (an abruptly halted python process, some activity on the user's disk unrelated to Synapse, etc). We could a cacheMap file file that is not parseable as JSON as if it does not exist, this would allow the download to continue and a fresh cacheMap file would be written.

This was encountered and reported by a forum user. In that case deleting the corrupt cacheMap file allowed them to continue.

https://www.synapse.org/#!Synapse:syn18779624/discussion/threadId=5710&replyId=23921

Environment

all

Activity

Show:
Jordan Kiang
February 6, 2021, 6:10 AM

The reporting user reported this solution fixed their issue in the linked thread. Closing.

Fixed

Assignee

Jordan Kiang

Reporter

Jordan Kiang

Labels

None

Validator

Jordan Kiang

Development Area

Synapse Core Infrastructure

Release Version History

None

Components

Fix versions

Affects versions

Priority

Major