diff options
| author | Dan Engelbrecht <[email protected]> | 2026-03-23 14:09:46 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-23 14:09:46 +0100 |
| commit | d336e5937019dbab1924419624faa6ffc776cd7f (patch) | |
| tree | cee312dc86f8404bbd4f987cbcf2f4d96124fc19 /src/zenserver/hub/storageserverinstance.h | |
| parent | Unique session/client tracking using HyperLogLog (#884) (diff) | |
| download | zen-d336e5937019dbab1924419624faa6ffc776cd7f.tar.xz zen-d336e5937019dbab1924419624faa6ffc776cd7f.zip | |
add hub instance crash recovery (#885)
* add hub instance crash recovery
Diffstat (limited to 'src/zenserver/hub/storageserverinstance.h')
| -rw-r--r-- | src/zenserver/hub/storageserverinstance.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/zenserver/hub/storageserverinstance.h b/src/zenserver/hub/storageserverinstance.h index ba15133bf..9963f640e 100644 --- a/src/zenserver/hub/storageserverinstance.h +++ b/src/zenserver/hub/storageserverinstance.h @@ -81,6 +81,10 @@ public: return m_Instance->UpdateMetricsLocked(); } +#if ZEN_WITH_TESTS + void TerminateForTesting() const; // kills the child process to simulate a crash +#endif + private: RwLock* m_Lock = nullptr; StorageServerInstance* m_Instance = nullptr; @@ -122,6 +126,7 @@ public: void Deprovision(); [[nodiscard]] bool Hibernate(); [[nodiscard]] bool Wake(); + [[nodiscard]] bool RecoverFromCrash(); // true = recovered; false = spawn failed (Crashed), caller must Deprovision() + cleanup private: RwLock* m_Lock = nullptr; @@ -136,6 +141,7 @@ private: [[nodiscard]] bool HibernateLocked(); [[nodiscard]] bool WakeLocked(); + [[nodiscard]] bool RecoverCrashedLocked(); // true = recovered (Provisioned); false = spawn failed (Crashed) void UpdateMetricsLocked(); |