qdrant / qdrant/rust-client

Escalate the 1.19 storage-flag deprecations: warn in 1.20, opt-in in 1.21, remove in 1.22

Open
#289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
415
Forks
83
Avg merge
2h 20m
Merged PRs (30d)
3

Description

Background

#288 (1.19 upgrade) supersedes the boolean storage flags with the new Memory enum and PayloadStorageParams:

  • on_diskmemory
  • always_rammemory
  • on_disk_payloadpayload

Those 18 builder setters shipped in 1.19 carrying only a doc-comment note, not a #[deprecated] attribute. That was deliberate: #[deprecated] is a hard error for any downstream crate that builds with #![deny(warnings)] or -D warnings (as this repo's own CI does), so attaching it in 1.19 would have made the 1.18 → 1.19 bump source-breaking for ordinary builder-based code. Measured at the time by compiling the 1.18 release's own snippet suite against the branch: 18 errors with the attribute, 0 without.

The intent was always to escalate rather than leave them soft forever. This issue tracks that.

Constraint worth stating up front

A library cannot escalate the deprecated lint from warn to deny — that is the consumer's choice. So each rung below increases visibility and then withdraws the escape hatch; none of them turns the warning into an error from our side.

Schedule

Release Rung Consumer impact
1.19 ✅ Doc-comment note pointing at the replacement none
1.20 Add #[deprecated(since = "1.19.0", note = "…")] warning; error only for -D warnings builds
1.21 Move the setters behind an opt-in cargo feature, deprecated-api, default off hard break, recoverable with one line in Cargo.toml
1.22 Delete hard break, no escape hatch

Removal lands in 1.22. That should be stated in the 1.20 release notes, so the first warning a user sees already names the release that takes the methods away.

Inventory

18 setters, all in src/builders/:

on_diskmemory (12)
VectorParamsBuilder, VectorParamsDiffBuilder, HnswConfigDiffBuilder, SparseIndexConfigBuilder, KeywordIndexParamsBuilder, IntegerIndexParamsBuilder, FloatIndexParamsBuilder, BoolIndexParamsBuilder, GeoIndexParamsBuilder, DatetimeIndexParamsBuilder, UuidIndexParamsBuilder, TextIndexParamsBuilder

always_rammemory (4)
ScalarQuantizationBuilder, ProductQuantizationBuilder, BinaryQuantizationBuilder, TurboQuantizationBuilder

on_disk_payloadpayload (2)
CreateCollectionBuilder, CollectionParamsDiffBuilder

Each already carries a /// Deprecated since 1.19.0, use [](Self::…) instead. note, so the 1.20 change is mechanical — the sites are greppable with grep -rn "Deprecated since 1.19.0" src/builders/.

Loose end: BinaryQuantizationBuilder::new(always_ram: bool)

Its only parameter is the superseded flag. 1.19 added a Default impl so BinaryQuantizationBuilder::default().memory(..) works without it, but new itself still needs a decision by 1.22 — drop it, or change it to take no arguments (breaking either way).

Out of scope: generated proto fields

The 1.16-era deprecations (Vector::data / indices / vectors_count, same on VectorOutput) live in generated code and carry prost's #[deprecated] because the proto marks them [deprecated = true]. The client cannot retire those independently — that has to come from the server proto. Only the hand-written surface is ours to schedule.

Open question

since value. These became deprecated in 1.19 but the attribute lands in 1.20. since = "1.19.0" is semantically accurate and is what the table above assumes; since = "1.20.0" would instead match when users first see a warning. Minor either way.

Checklists

1.20

  • #[deprecated(since, note)] on all 18 setters
  • #[allow(deprecated)] on the corresponding build_inner fns (they still populate the old proto fields) — already present from #288
  • Repo's own usages migrated so CI stays green under -D warnings
  • Migration table in the release notes, naming 1.22 as the removal release
  • CONTRIBUTING.md records the ladder, so future upgrades follow it by default instead of re-deciding each time

1.21

  • deprecated-api feature added, default off, gating the 18 setters
  • Release notes repeat the 1.22 removal date

1.22

  • Setters deleted, feature removed
  • BinaryQuantizationBuilder::new resolved

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by grepping src/builders/ for Deprecated since 1.19.0 and reviewing the 18 setters plus their build_inner callers. Then inspect the release-notes files and CONTRIBUTING.md; resolve the since value and BinaryQuantizationBuilder::new decision before implementing the staged checklist. Done means the selected release rung, tests and -D warnings CI are covered, with migration guidance and the 1.22 removal date documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, documentation, release
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.