RocksDB storage backend should support relative paths
enhancement
## Problem
The RocksDB storage backend validation rejects relative paths with:
```
RocksDB path must be absolute, got: ./data/indexes
```
This forces users to hardcode machine-specific absolute paths in their config files, which:
1. **Breaks portability** — configs can't be shared across machines, checked into version control, or used in containers without modification
2. **Breaks simplicity** — a user who just wants to store indexes next to their config file has to figure out and type the full absolute path
3. **Contradicts user expectations** — most tools that accept file paths (databases, log files, etc.) resolve relative paths against the working directory or config file location
## Proposed Solution
Resolve relative paths against either:
- The working directory at startup (simplest), or
- The directory containing the config file (more predictable)
If there's a concern about ambiguity, a warning log message like `"Resolving relative RocksDB path './data/indexes' against CWD: /home/user/project"` would address it without blocking the user.
## Current Workaround
Use a full absolute path:
```yaml
storageBackend:
backend_type: rocksdb
path: /home/username/project/data/indexes
```
## References
- Validation code: `lib/src/indexes/config.rs:100-106`
- Introduced in PR #153
0 条评论