Merge pull request #35948 from overleaf/dk-git-bridge-health-check-race

[git-bridge] Fix health check race on shared probe file

GitOrigin-RevId: 1463880cb4770a730e3e164bf9a5ff89366434b5
This commit is contained in:
Maria Florencia Besteiro Gonzalez
2026-09-17 11:40:21 +00:00
committed by Copybot
parent 803b41bfdd
commit c0cb6710ba
2 changed files with 44 additions and 1 deletions
@@ -244,7 +244,9 @@ public class Bridge {
gcJob.start();
}
public boolean healthCheck() {
// synchronized so concurrent health checks (e.g. liveness and readiness
// probes) don't race on the shared probe file and observe partial writes
public synchronized boolean healthCheck() {
try {
dbStore.getNumProjects();
// Check the repo store volume, not the container root filesystem, so a