Эх сурвалжийг харах

Merge pull request #30497 from overleaf/mj-git-bridge-staging-swap

[git-bridge] Reduce amount of projects on staging git bridge disk

GitOrigin-RevId: 428825f354487ece20b2538e7d312186d56cc03a
Mathias Jakobsen 9 сар өмнө
parent
commit
32845170ff

+ 3 - 1
services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/swap/job/SwapJobImpl.java

@@ -144,7 +144,9 @@ public class SwapJobImpl implements SwapJob {
         exceptionProjectNames.add(projectName);
       }
     }
-    if (totalSize > lowWatermarkBytes) {
+    if (lowWatermarkBytes > 0 && totalSize > lowWatermarkBytes) {
+      // NOTE: If lowWatermarkBytes is 0, we never expect to reach it (since
+      // we keep the repo database on disk), so don't log a warning.
       Log.warn("Finished swapping, but total size is still too high.");
     }
     Log.debug(