fix(watchers/watcher.node): Improve Node watcher robustness: inode tracking, ENOSPC detection, enhanced health checks and temp-file handling

This commit is contained in:
2025-12-08 19:31:48 +00:00
parent 913c14bfcf
commit 0c236d44d3
4 changed files with 92 additions and 14 deletions

View File

@@ -1,5 +1,15 @@
# Changelog
## 2025-12-08 - 6.1.1 - fix(watchers/watcher.node)
Improve Node watcher robustness: inode tracking, ENOSPC detection, enhanced health checks and temp-file handling
- Track directory inodes (watchedInodes) and restart watchers if inode changes are detected (addresses stale watchers when directories are replaced).
- Health check now validates inode stability and explicitly detects ENOSPC (inotify max_user_watches) errors, emitting errors and logging a recommended fix command.
- Detect ENOSPC in FSWatcher error events and log guidance to increase inotify limits.
- Clear inode tracking state on watcher stop to avoid stale state across restarts.
- Improve temporary file handling and logging to avoid dropping events for atomic writes (only skip pure temp files and log skipped temp events).
- Documentation (readme.hints.md) updated with robustness notes, known fs.watch limitations, and example logs.
## 2025-12-08 - 6.1.0 - feat(watcher.node)
Add automatic restart, periodic health checks, and safe event emission to Node watcher; improve logging and stat handling