Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Comments say snapshot shard transfer uses `PartialSnapshot`, but the code uses `Recovery`

Open Beginner friendly
#11,311 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
databases

Research direction

Read the cited comments in lib/collection/src/shards/transfer/snapshot.rs, src/common/snapshots.rs, and lib/collection/src/shards/replica_set/snapshots.rs, then check the test at lib/collection/src/shards/replica_set/snapshots/tests.rs. The issue explains that start_shard_transfer uses Recovery; update the outdated state references and set the test target to ReplicaState::Recovery. Done when the comments and test match the state used by real transfers.

Written by the indexing model from the issue text.

Description

Current Behavior

Several comments say that the receiving replica of a snapshot shard transfer is in the PartialSnapshot state:

The code does something else. Since #3847 (Qdrant 1.9), Collection::start_shard_transfer sets the receiving replica to Recovery for both the Snapshot and WalDelta methods (shard_transfer.rs L140). ReplicaState::PartialSnapshot is marked as deprecated since 1.9.0 (replica_set_state.rs L113).

Line numbers are from dev at 23320c2c8.

Expected Behavior

The comments name the state the code actually uses (Recovery), and the test sets the same state that a real transfer uses.

Fixed by

PR #11310 fixes this issue

Possible Solution

Replace PartialSnapshot with Recovery in those comments, and set ReplicaState::Recovery in the test. Both states return false from can_be_source_of_truth(), so the test checks the same thing as before.

Context (Environment)

I found this while reading the shard replication path (replicate_shard, snapshot method) to understand how a new replica gets its data.

Dominant language
Rust
Stars
35.2k
Forks
2.8k
Avg merge
2d 1h
Merged PRs (30d)
284

Getting set up

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.

More from qdrant/qdrant

All issues in qdrant/qdrant

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.