mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-12-06 19:52:24 +03:00
- Give a cloud space with an account a database of its own for each canonical server origin and user. Local spaces keep the 0.27.5 name `local:${type}:${id}`. The canonical origin rejects a URL with a user name or password.
- Keep `local_seq` acknowledgements in `peerClocks` for each account. The pushed watermark moves only across a gap-free run of acknowledgements.
- Add `getTier1DocsRaw`, `getDocsByIdsRaw`, and `listDocIds`. Key cursors find the records. A cold read reads no other page frames and no blob bytes. Key cursors also read the stored times of all documents. A write of an unloaded page then sorts after its stored updates.
- Add the `lazyTier1` mode to `openDesktopStore`, with `loadDocFrames`, `loadBlob`, and `listStoredDocIds`. These reads apply the changes that have not committed yet on top of the stored data. The storage reports each committed op in the `complete` event of its write transaction.
- Add `createReplicatorLease`. It elects one replicator tab per database with the Web Locks API. Without that API, it uses a heartbeat lease on a `BroadcastChannel`, then a single tab. The lock holder answers lease probes and leads after the lease tab yields. A lease candidate withdraws for a lower tab ID.
- Post a `changes` message with document and blob IDs after each committed write, compaction, blob change, and watermark move. Add `deleteBlob`.