Skip to content

Mutable ID tracker integration#6174

Merged
timvisee merged 7 commits intodevfrom
mutable-id-tracker-integration
Mar 19, 2025
Merged

Mutable ID tracker integration#6174
timvisee merged 7 commits intodevfrom
mutable-id-tracker-integration

Conversation

@timvisee
Copy link
Copy Markdown
Member

@timvisee timvisee commented Mar 17, 2025

Tracked in: #6157
Depends on: #6173

Add support for the new mutable ID tracker.

It is currently locked behind a feature flag, only enabled in development builds. In the next Qdrant release the new tracker will enabled globally.

  • Feature flag disabled (default in production build)
    RocksDB based tracker is used by default, unless new mappings are stored on disk
  • Feature flag enabled (default in development build)
    New tracker is used by default, unless there are RocksDB mappings on disk

Set QDRANT__FEATURE_FLAGS__USE_MUTABLE_ID_TRACKER_WITHOUT_ROCKSDB=true to prematurely enable the new ID tracker.

Tasks

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

@timvisee timvisee force-pushed the mutable-id-tracker-truncate-partial-mapping branch from 40c187d to 0ba670f Compare March 18, 2025 10:21
@timvisee timvisee force-pushed the mutable-id-tracker-integration branch 3 times, most recently from 8abbf31 to fda7c08 Compare March 18, 2025 10:42
@timvisee timvisee mentioned this pull request Mar 18, 2025
6 tasks
Base automatically changed from mutable-id-tracker-truncate-partial-mapping to dev March 19, 2025 09:39
@timvisee timvisee force-pushed the mutable-id-tracker-integration branch from fda7c08 to 6909926 Compare March 19, 2025 09:40
@timvisee timvisee marked this pull request as ready for review March 19, 2025 09:40
@coderabbitai

This comment was marked as resolved.

@timvisee timvisee force-pushed the mutable-id-tracker-integration branch from 6909926 to 1f10060 Compare March 19, 2025 10:25
coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Member

@generall generall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some manual tests to check that id_tracked doesn't grow indefinitelly:

  • upsert points in a loop with overwrite
  • create and delete the same point 1k times

In both cases files either don't grow (because we re-use same internal id), or optimizer kicks-in and vacuums the segment.
So works as expected.

One unpleasant side-effect: if new id tracker is recovered in old version, which doesn't know about it, it will be treated as if there are no points in segment, rather than a panic. (might be possible to address in separate PR)

timvisee added a commit that referenced this pull request Mar 21, 2025
* Rename mutable ID tracker mappings file

* Make new ID tracker the default, add new variant for RocksDB tracker

* In mutable ID tracker, only list files if they exist on disk

* Don't use the new mutable ID tracker yet

* Feature flag usage of new mutable ID tracker

* Simplify RocksDB check a bit

* Rename both the mutable ID tracker files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants