Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
- Fixed signing in to a mailbox when your username or password contains characters beyond ASCII, such as umlauts, accents, or Asian characters. Depending on its configuration, a mail server may expect them in another encoding than UTF-8. You can now choose the encoding in the server details of the mailbox, and after a failed sign-in, AI Studio offers to test the connection once more with the encoding common in your region.
- Upgraded several libraries to improve security.
- Upgraded Tauri to v2.12.7.
- Upgraded PDFium to v158.0.8125.0.
- Upgraded PDFium to v158.0.8125.0 and Qdrant Edge to v0.9.0.
- Upgraded to Rust v1.100.0.
- Upgraded to .NET v10.0.15.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Qdrant Edge WAL Compaction

- Status: Active
- Status: Removed
- Introduced: 2026-10-09
- Removed: 2026-11-24, with qdrant-edge 0.9.0, which acknowledges its WAL in `EdgeShard::flush` ([qdrant/qdrant#11082](https://github.com/qdrant/qdrant/pull/11082)). Stores of older versions get their WAL marked as acknowledged instead, see `2026-11-qdrant-edge-legacy-wal.md`.
- Remove after: when a qdrant-edge release acknowledges its WAL in `EdgeShard::flush` by itself, see [qdrant/qdrant#11068](https://github.com/qdrant/qdrant/issues/11068)
- Code references:
- `runtime/src/qdrant_edge_database.rs` (`compact_wal`, `has_obsolete_wal_segments`, `remove_obsolete_wal_segments`, `wal_file_names`, `obsolete_wal_segments`, `optimize_store`)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Qdrant Edge Legacy WAL

- Status: Active
- Introduced: 2026-11-24
- Remove after: when a qdrant-edge release skips the operations of the WAL which its segments already persisted when it loads a store
- Code references:
- `runtime/src/qdrant_edge_database.rs` (`acknowledge_legacy_wal`, `WAL_FIRST_INDEX_FILE`, `WAL_FIRST_INDEX_FILE_TEMP`)

## User Impact

Up to qdrant-edge 0.8.0, Qdrant Edge wrote every update of a vector store to its write-ahead log (WAL), but never acknowledged the WAL. Since 0.9.0, loading a store applies every operation of the WAL again which is not marked as acknowledged. The first load of a store written by an older version of AI Studio therefore applies its whole WAL once more.

That WAL holds thousands of operations. Each deletion of a document in there reads and parses every payload of the store, because the fields it filters on have no payload index. For a real store of 317 MB with 20,316 operations in its WAL, the first load had not finished after more than 12 minutes. Meanwhile, every request to the vector database waits, and when the user quits AI Studio before the load is done, the next start begins again.

## Compatibility Behavior

Right before AI Studio loads a vector store, it checks whether the WAL directory of the store holds the file `first-index`, in which Qdrant Edge notes how far its WAL is acknowledged. A store of an older version lacks it, because Qdrant Edge 0.9 writes it only with the first flush after an update; so does a new store before its first update, whose WAL holds nothing to apply anyway. For such a store, AI Studio writes the file with the highest possible index, `{"ack_index":18446744073709551615}`, through a temporary file. Qdrant Edge lowers this index to the last entry of the WAL when it opens the WAL, so loading the store applies only that one operation once more.

This is safe because AI Studio flushes after every update, so the segments already hold everything the WAL contains, and because qdrant-edge 0.8 never applied its WAL anyway. A failed write is logged as a warning and does not block loading the store; the load then takes long, but nothing gets lost. The file has the same format in qdrant-edge 0.8 and 0.9, so an older version of AI Studio still opens the store.

## Removal Checklist

- Check that the new qdrant-edge release no longer applies operations which the segments already persisted, e.g., by starting the WAL replay at the highest version the segments persisted.
- Remove `acknowledge_legacy_wal` and the constants `WAL_FIRST_INDEX_FILE` and `WAL_FIRST_INDEX_FILE_TEMP`, unless the tests still need them.
- Remove the `acknowledge_legacy_wal` calls from `get_or_create_store` and `get_existing_store`.
- Remove the test `a_store_of_an_older_version_gets_its_wal_acknowledged_and_keeps_its_points`, and keep `an_acknowledged_wal_stays_as_it_is` only if it still checks something of AI Studio.
- Update this document's status to `Removed`.
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
2.12.7
9d1768e2f40, release
158.0.8125.0
0.8.0
0.9.0
Loading
Loading