mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 11:43:44 -05:00
Log and trap/ignore gc errors during swap
This commit is contained in:
parent
980a2ab98f
commit
f237efa6d5
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