Commit Graph
25 Commits
Author SHA1 Message Date
rustmailer 02e9864343 Merge remote-tracking branch 'origin/main' into replace-fjall-with-blob 2026-07-28 21:38:44 +08:00
rustmailer eae26d3e97 perf(blob): batch blob writes during migration to avoid per-blob fsync overhead 2026-07-28 21:13:16 +08:00
rustmailer 664ac2fe55 fix: can't set proxy for email account (IMAP) #326 2026-07-20 23:00:36 +08:00
rustmailer c468f8be41 fix(admin): skip oversized blobs during migration instead of aborting 2026-07-16 05:22:10 +08:00
rustmailer 951901ac0b update 2026-07-14 05:49:54 +08:00
rustmailer b7e757dbf7 update 2026-07-13 20:56:26 +08:00
rustmailer 36692e2091 feat: replace fjall with bichon-blob for blob storage
- use a single Engine instance for email + attachment blobs
  - add delete_batch, gc_if_needed, background flush to blob crate
  - fix Entry.raw_size storing compressed length instead of original
  - move fjall-dependent migration code from core to admin crate
  - add STORAGE_VERSION file for layout version detection
2026-07-10 03:17:38 +08:00
rustmailer bba1ea5cc7 feat: add per-account FilterRule, ExtractionRules and ArchiveRules with regex validation 2026-06-24 21:46:32 +08:00
rustmailer 9e55026f12 feat: add SSO/OIDC support to user model and settings 2026-06-24 17:32:14 +08:00
rustmailer 04745458bc feat(blob): add embedded KV storage engine for email archiving 2026-06-23 21:38:31 +08:00
rustmailer c736afffb0 fix: account deletion times out #291 2026-06-07 15:34:38 +08:00
rustmailerandGitHub 327a3f39d9 Merge pull request #287 from fama/dedup-cache-fix
fix: open NewIndexWriter once across all migration segments
2026-06-04 10:24:22 +08:00
fama 427f7248d2 fix: open NewIndexWriter once across all migration segments
Previously, do_migrate_segment created a fresh NewIndexWriter (and
therefore a new Fjall Database) on every call, meaning the Fjall
database at bichon-storage/ was opened and closed once per segment.

This caused the migration to fail mid-way through (observed at segment
9/16) with:

  Storage(InvalidTag(("ChecksumType", 171)))

Root cause: after segment N writes email blobs via Fjall's ingestion
API (start_ingestion / write / finish), those SSTables and KV-separated
blob files are flushed to disk and the Database is dropped. When segment
N+1 calls Database::builder(storage_dir).open(), Fjall must discover and
catalog all on-disk files produced by the previous segments. During that
discovery it reads SSTable or blob-file block headers and encounters a
ChecksumType discriminant byte (171 / 0xAB) that lsm-tree 3.1.4 does
not recognise, causing the fatal error.

The first N segments succeed because the cumulative set of ingested
SSTables stays small enough that Fjall does not need to read the
offending headers during reopen. Once enough data has accumulated the
reopen triggers a manifest or compaction read that exposes the mismatch.

Fix: open NewIndexWriter once, before the segment loop, and pass a
&mut reference into each do_migrate_segment call. finish_writers() is
called a single time after all segments complete. The Fjall Database
stays open for the entire migration and is never closed and reopened,
eliminating the incompatible-reopen path entirely.
2026-06-03 15:10:03 -06:00
rustmailer a2a51a2037 feat(imap): add message size check before download 2026-06-03 21:17:35 +08:00
rustmailer 048d5f361c fix: Cant migrate with version >= 1.4.0 #277 2026-05-28 22:49:24 +08:00
rustmailer f30cd66e00 feat: remove folder limit 2026-05-26 15:22:14 +08:00
rustmailer 4bd714a670 chore: remove custom global allocator 2026-05-26 15:20:59 +08:00
rustmailer 005b1c2116 feat: added Cron scheduling for email downloads #211 2026-05-23 15:40:46 +08:00
rustmailer 0dd81f599d update 2026-05-22 22:21:46 +08:00
rustmailer 7fde7ee19a update 2026-05-17 10:35:32 +08:00
rustmailer b2a75643da fix(bichon-admin): reduce memory usage during data migration 2026-05-16 22:17:03 +08:00
rustmailer e708dc524b Update reset.rs 2026-05-15 01:17:40 +08:00
rustmailer 5406c4322c refactor: replace native_db with memdb and add tests 2026-05-14 02:29:23 +08:00
rustmailer 0abaa66a40 feat(admin): add interactive data migration tool 2026-05-12 01:56:24 +08:00
rustmailer 0b866c81ff refactor(workspace): decompose project into multiple crates 2026-04-23 21:45:34 +08:00