-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Labels
enhancementNew feature or requestNew feature or request
Description
PR #738 added directory replication functionality that allows Litestream to replicate all SQLite databases found within a directory structure. Currently, this only picks up databases that exist when Litestream starts.
The next enhancement is to add file/directory watcher support so that:
- New databases are automatically detected when they're created in the watched directory after Litestream has started
- Deleted databases are removed from replication when they're deleted from the filesystem
- The system automatically adapts to changes in the directory structure without requiring a restart
Implementation Considerations
- Use appropriate file system watcher for cross-platform support (e.g.,
fsnotify) - Handle edge cases like temporary files, partially-written databases, and rapid create/delete cycles
- Consider performance implications for directories with many databases
- Maintain thread safety when adding/removing database monitors
- Log clear messages when databases are added to or removed from replication
Related Work
- PR feat: add directory replication support for multi-tenant databases #738 (Directory replication feature)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request