Introduce error recovery mechanisms with retry logic and circuit breaker integration.

- Added `ErrorRecovery.cc` and `ErrorRecovery.h` for retry and circuit breaker implementations.
- Enhanced swap file handling with transient error retries and exponential backoff (e.g., ENOSPC, EDQUOT).
- Integrated circuit breaker into SwapManager to gracefully handle repeated failures, prevent system overload, and enable automatic recovery.
- Updated `DEVELOPER_GUIDE.md` with comprehensive documentation on error recovery patterns and graceful degradation strategies.
- Refined fsync, temp file creation, and swap file logic with retry-on-failure mechanisms for improved resilience.
This commit is contained in:
2026-02-17 21:38:40 -08:00
parent daeeecb342
commit 0d87bc0b25
7 changed files with 624 additions and 17 deletions

View File

@@ -144,6 +144,7 @@ set(COMMON_SOURCES
Swap.cc
ErrorHandler.cc
SyscallWrappers.cc
ErrorRecovery.cc
TerminalInputHandler.cc
TerminalRenderer.cc
TerminalFrontend.cc
@@ -341,6 +342,7 @@ if (BUILD_TESTS)
Swap.cc
ErrorHandler.cc
SyscallWrappers.cc
ErrorRecovery.cc
KKeymap.cc
SwapRecorder.h
OptimizedSearch.cc