From 8e802d4a91592213354f948aa81fb4b8891e03bc Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Thu, 13 Nov 2025 13:31:53 +0200 Subject: [PATCH] Default `vacuum_retention_seconds` increased from 60 seconds to 86400 seconds (1 day) for better version retention in typical workflows --- CHANGELOG.md | 1 + docs/cli.md | 2 +- docs/configuration.md | 6 +++--- haiku_rag_slim/haiku/rag/config/loader.py | 2 +- haiku_rag_slim/haiku/rag/config/models.py | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5bb56d4..0b0ddd47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/docs/cli.md b/docs/cli.md index b47c2587..53d629b0 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -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 diff --git a/docs/configuration.md b/docs/configuration.md index 3f8da060..b2e91cb4 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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 diff --git a/haiku_rag_slim/haiku/rag/config/loader.py b/haiku_rag_slim/haiku/rag/config/loader.py index d6584351..946d9571 100644 --- a/haiku_rag_slim/haiku/rag/config/loader.py +++ b/haiku_rag_slim/haiku/rag/config/loader.py @@ -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": [], diff --git a/haiku_rag_slim/haiku/rag/config/models.py b/haiku_rag_slim/haiku/rag/config/models.py index 4883859d..a0542a89 100644 --- a/haiku_rag_slim/haiku/rag/config/models.py +++ b/haiku_rag_slim/haiku/rag/config/models.py @@ -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):