mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
simplify health check comments
GitOrigin-RevId: cc31a6fd98a2c21b8163912e25542e5584d1794f
This commit is contained in:
committed by
Copybot
parent
655034fb8e
commit
0a913bba5e
@@ -247,18 +247,14 @@ public class Bridge {
|
||||
public boolean healthCheck() {
|
||||
try {
|
||||
dbStore.getNumProjects();
|
||||
// Check the repo store volume (the PVC mounted at the repo store root), not the
|
||||
// container root filesystem. A read-only or detached volume must fail the check.
|
||||
// Check the repo store volume, not the container root filesystem, so a
|
||||
// read-only or detached volume fails the check.
|
||||
File rootDirectory = repoStore.getRootDirectory();
|
||||
if (rootDirectory == null || !rootDirectory.isDirectory()) {
|
||||
throw new Exception("repo store root directory does not exist: " + rootDirectory);
|
||||
}
|
||||
// Write and read back a small probe file to confirm the volume is mounted read-write.
|
||||
// Use the .wlgb directory (excluded from project purging) so we never touch project
|
||||
// storage. A single fixed-name file is overwritten on each probe (never deleted), so we
|
||||
// avoid churning through unique files and can't leave orphaned temp files behind. Both
|
||||
// liveness and readiness probes write identical content, so this is safe under concurrent
|
||||
// probes.
|
||||
// Confirm the volume is writable: overwrite a fixed probe file in .wlgb
|
||||
// (outside project storage) and read it back.
|
||||
File wlgbDirectory = new File(rootDirectory, ".wlgb");
|
||||
if (!wlgbDirectory.isDirectory()) {
|
||||
throw new Exception("repo store .wlgb directory does not exist: " + wlgbDirectory);
|
||||
|
||||
Reference in New Issue
Block a user