mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #63 from overleaf/sk-emergency-log-and-trap-gc-errors
Log and trap/ignore gc errors during swap
This commit is contained in:
commit
8086a1b2b4
1 changed files with 5 additions and 1 deletions
|
@ -162,7 +162,11 @@ public class SwapJobImpl implements SwapJob {
|
||||||
Preconditions.checkNotNull(projName, "projName was null");
|
Preconditions.checkNotNull(projName, "projName was null");
|
||||||
Log.info("Evicting project: {}", projName);
|
Log.info("Evicting project: {}", projName);
|
||||||
try (LockGuard __ = lock.lockGuard(projName)) {
|
try (LockGuard __ = lock.lockGuard(projName)) {
|
||||||
|
try {
|
||||||
repoStore.gcProject(projName);
|
repoStore.gcProject(projName);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.error("[{}] Exception while running gc on project: {}", projName, e);
|
||||||
|
}
|
||||||
long[] sizePtr = new long[1];
|
long[] sizePtr = new long[1];
|
||||||
try (InputStream blob = repoStore.bzip2Project(projName, sizePtr)) {
|
try (InputStream blob = repoStore.bzip2Project(projName, sizePtr)) {
|
||||||
swapStore.upload(projName, blob, sizePtr[0]);
|
swapStore.upload(projName, blob, sizePtr[0]);
|
||||||
|
|
Loading…
Reference in a new issue