Default vacuum_retention_seconds increased from 60 seconds to 86400 seconds (1 day) for better version retention in typical workflows

This commit is contained in:
Yiorgis Gozadinos 2025-11-13 13:31:53 +02:00
parent cb1001dc29
commit 8e802d4a91
No known key found for this signature in database
5 changed files with 7 additions and 6 deletions

View file

@ -30,6 +30,7 @@
### Changed
- **Vacuum Retention**: Default `vacuum_retention_seconds` increased from 60 seconds to 86400 seconds (1 day) for better version retention in typical workflows
- **BREAKING**: Major refactoring of graph-related code into unified `haiku.rag.graph` module structure:
- `haiku.rag.research``haiku.rag.graph.research`
- `haiku.rag.qa.deep``haiku.rag.graph.deep_qa`

View file

@ -231,7 +231,7 @@ Reduce disk usage by optimizing and pruning old table versions across all tables
haiku-rag vacuum
```
**Automatic Cleanup:** Vacuum runs automatically in the background after document operations. By default, it removes versions older than 60 seconds (configurable via `storage.vacuum_retention_seconds`), preserving recent versions for concurrent connections. Manual vacuum can be useful for cleanup after bulk operations or to free disk space immediately.
**Automatic Cleanup:** Vacuum runs automatically in the background after document operations. By default, it removes versions older than 1 day (configurable via `storage.vacuum_retention_seconds`), preserving recent versions for concurrent connections. Manual vacuum can be useful for cleanup after bulk operations or to free disk space immediately.
### Rebuild Database

View file

@ -53,7 +53,7 @@ environment: production
storage:
data_dir: "" # Empty = use default platform location
disable_autocreate: false
vacuum_retention_seconds: 60
vacuum_retention_seconds: 86400
monitor:
directories:
@ -592,9 +592,9 @@ processing:
storage:
# Vacuum retention threshold (seconds) for automatic cleanup
# When documents are added/updated, old table versions older than this are removed
# Default: 60 seconds (safe for concurrent connections)
# Default: 86400 seconds (1 day, safe for concurrent connections)
# Set to 0 for aggressive cleanup (removes all old versions immediately)
vacuum_retention_seconds: 60
vacuum_retention_seconds: 86400
```
#### Markdown Preprocessor

View file

@ -54,7 +54,7 @@ def generate_default_config() -> dict:
"storage": {
"data_dir": "",
"disable_autocreate": False,
"vacuum_retention_seconds": 60,
"vacuum_retention_seconds": 86400,
},
"monitor": {
"directories": [],

View file

@ -8,7 +8,7 @@ from haiku.rag.utils import get_default_data_dir
class StorageConfig(BaseModel):
data_dir: Path = Field(default_factory=get_default_data_dir)
disable_autocreate: bool = False
vacuum_retention_seconds: int = 60
vacuum_retention_seconds: int = 86400
class MonitorConfig(BaseModel):