Merge pull request #67 from overleaf/sk-dont-catch-throwable-swap-impl

Don't catch `Throwable` in swap-job, catch Exception
This commit is contained in:
Shane Kilkelly 2019-06-13 12:11:01 +01:00 committed by GitHub
commit a68afc2e28

View file

@ -139,8 +139,8 @@ public class SwapJobImpl implements SwapJob {
String projectName = dbStore.getOldestUnswappedProject();
try {
evict(projectName);
} catch (Throwable t) {
Log.warn("[{}] Exception while swapping, mark project and move on", projectName, t);
} catch (Exception e) {
Log.warn("[{}] Exception while swapping, mark project and move on", projectName, e);
// NOTE: this is something of a hack. If a project fails to swap we get stuck in a
// loop where `dbStore.getOldestUnswappedProject()` gives the same failing project over and over again,
// which fills up the disk with errors. By touching the access time we can mark the project as a