Dionisio
9f692f03c3
Implement dual DB pools (primary + maintenance) and wire services
2026-02-24 19:28:00 +01:00
Dionisio
71c2cb5edb
perf: Arc<AppState>, streaming PROPFIND, spawn_blocking SHA-256
...
- Issue #4 : Wrap AppState in Arc — eliminates 42 Arc::clone + 16 String::clone per request
- Issue #2 : Reject Depth:infinity with 403 + streaming XML with paginated DB queries
- Issue #5 : Move chunked upload assembly (SHA-256 hash-on-write) to spawn_blocking
- Remove ~270 lines dead code from di.rs (unused builders, Default impl, stubs)
- Clean up unused tokio imports in chunked_upload_service.rs
2026-02-24 15:11:56 +01:00
Dionisio
ed433df2af
perf(zip): eliminate N+1 queries with ltree bulk subtree fetch
...
Replace BFS traversal that issued 2 SQL queries per folder (list_files +
list_folders) with 2 total queries using PostgreSQL ltree <@ operator:
1. list_subtree_folders: single GiST-indexed scan for all folders
2. list_files_in_subtree: single GiST-indexed join for all files
Files are grouped by folder_id in a HashMap, then iterated in directory
order (folders pre-sorted by path from SQL).
Changes across 4 architecture layers:
- Domain: FolderRepository::list_subtree_folders (default impl)
- Application ports: FolderUseCase, FileRetrievalUseCase, FileReadPort
- Application services: FolderService, FileRetrievalService passthroughs
- Infrastructure: PG implementations + ZipService rewrite
Query count: O(N) → O(1). Latency for 100-folder tree: ~200 round-trips → 3.
2026-02-24 12:18:38 +01:00
Diocrafts
85908311dc
perf: findings 6.1, 6.2, 2.6 — async Argon2, moka cache, full streaming migration
...
- 6.1: PasswordHasherPort now async_trait with spawn_blocking for Argon2
- 6.2: OIDC pending maps migrated from std::sync::Mutex to moka::sync::Cache with TTL
- 2.6: All file download paths migrated to 64KB streaming (get_file_stream / read_blob_stream)
- WOPI, dedup, batch ZIP, file_retrieval_service consumers migrated
- WebDAV COPY uses zero-copy dedup (copy_file)
- Removed dead code: get_file_content, get_file_mmap, read_blob, read_blob_bytes
from traits, impls, stubs, and mocks (18 files touched)
2026-02-23 00:51:46 +01:00
Diocrafts
92e0364a60
fix: OOM protection, lock-free thumbnail cache, OIDC JWKS TTL
...
- Streaming WebDAV PUT: body spooled to tempfile with incremental SHA-256,
peak RAM ~64KB regardless of file size (Solution 2)
- RequestBodyLimitLayer (1MB) on CalDAV/CardDAV routers (Solution 3)
- All body::to_bytes(body, usize::MAX) replaced with explicit limits:
PROPFIND/PROPPATCH/LOCK → 1MB, MKCOL → 4KB
- Added AppError::payload_too_large (HTTP 413)
- Added max_upload_size to StorageConfig (default 10GB, env override)
- New streaming update chain: FileWritePort::update_file_content_from_temp
→ FileUploadUseCase::update_file_streaming
- ThumbnailService: migrated from RwLock<LruCache> to moka::future::Cache
with weight-based eviction — eliminates lock contention on read hot-path
- OIDC: discovery + JWKS caches now expire after 1 hour (Cached<T> wrapper)
so IdP key rotation no longer requires server restart
2026-02-22 23:28:03 +01:00
Dionisio
1ed20f425f
perf: Phase 4+5 optimizations — uploads 10x, downloads 2x, concurrent 2x. moka cache, 512KB buffers, remove sync_all, hash-on-write, preloaded queries, bench.sh v3, gitignore storage/. 500MB upload 12.6s->1.3s (392MB/s). RSS 69-113MB, 0 swap.
2026-02-15 17:56:47 +01:00
Dionisio
fac0b5e77b
fix: critical bugs from deep audit
...
- Fix copy_files() data loss: implement real copy_file across full stack
(FileWritePort, FileManagementUseCase, stubs, service, repository with
atomic CTE + dedup ref_count increment, batch_operations caller)
- Fix plaintext password in replace_default_admin: hash password via
PasswordHasherPort before User::new()
- Fix CalendarService hardcoded user_id: unify CalendarUseCase trait with
explicit user_id parameter on all methods, remove zombie _for_user
duplicates and hardcoded 'current_user_id', update 20 CalDAV handler
call sites
- Previous session: migrate DedupService to PostgreSQL (storage.blobs),
atomic CTEs with compensation for file/folder repository operations
2026-02-14 20:22:19 +01:00
Dionisio
4c98c5a657
style: apply cargo fmt to entire codebase
...
Standardize code formatting across all 173 Rust source files
using rustfmt. No functional changes - purely cosmetic.
This establishes a consistent code style baseline for the
project going forward.
2026-02-14 01:29:34 +01:00
Dionisio
d31a413e57
chore: translate all Spanish comments and log messages to English
2026-02-12 09:41:25 +01:00
Diocrafts
5bd505ccd7
modernizing frontend
2026-02-08 22:44:42 +01:00
Diocrafts
a82faa5eaf
refactoring hexagonal and clean architecture
2026-02-08 13:40:23 +01:00
DioCrafts
cafad0fbfd
adding user authentication
2025-03-20 09:22:31 +01:00
DioCrafts
6e055c3043
adding features
2025-03-19 19:52:12 +01:00