vaultik/internal/snapshot
sneak 05286bed01 Batch transactions per blob for improved performance
Previously, each chunk and blob_chunk was inserted in a separate
transaction, leading to ~560k+ transactions for large backups.
This change batches all database operations per blob:

- Chunks are queued in packer.pendingChunks during file processing
- When blob finalizes, one transaction inserts all chunks, blob_chunks,
  and updates the blob record
- Scanner tracks pending chunk hashes to know which files can be flushed
- Files are flushed when all their chunks are committed to DB
- Database is consistent after each blob finalize

This reduces transaction count from O(chunks) to O(blobs), which for a
614k file / 44GB backup means ~50-100 transactions instead of ~560k.
2025-12-23 19:07:26 +07:00
..
backup_test.go Major refactoring: Updated manifest format and renamed backup to snapshot 2025-07-26 03:27:47 +02:00
file_change_test.go Optimize scan phase: in-memory change detection and batched DB writes 2025-12-19 12:08:47 +07:00
manifest.go Major refactoring: Updated manifest format and renamed backup to snapshot 2025-07-26 03:27:47 +02:00
module.go Add pluggable storage backend, PID locking, and improved scan progress 2025-12-19 11:52:51 +07:00
progress.go Refactor: Move Vaultik struct and methods to internal/vaultik package 2025-07-26 14:47:26 +02:00
scanner_test.go Optimize scan phase: in-memory change detection and batched DB writes 2025-12-19 12:08:47 +07:00
scanner.go Batch transactions per blob for improved performance 2025-12-23 19:07:26 +07:00
snapshot_test.go Integrate afero filesystem abstraction library 2025-07-26 15:33:18 +02:00
snapshot.go Fix foreign key error when deleting incomplete snapshots 2025-12-19 12:27:05 +07:00