Skip to content

Delete unused code - #8771

Merged
timvisee merged 5 commits into
devfrom
delete-unused-code
Apr 24, 2026
Merged

timvisee merged 5 commits into
devfrom
delete-unused-code

Conversation

@agourlay

@agourlay agourlay commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

This PR removes dead code that is both not used and not tested.

Keeping it around is a debt and a risk.

@agourlay
agourlay marked this pull request as ready for review April 22, 2026 15:26
@agourlay
agourlay requested a review from timvisee April 22, 2026 15:26
coderabbitai[bot]

This comment was marked as resolved.

Comment thread lib/collection/src/operations/types.rs Resolved
@qdrant qdrant deleted a comment from coderabbitai Bot Apr 22, 2026
@agourlay
agourlay requested a review from timvisee April 23, 2026 08:27
@qdrant qdrant deleted a comment from coderabbitai Bot Apr 23, 2026
Comment on lines -222 to -227
impl NamedVectors {
pub fn add_vector(mut self, name: impl Into<String>, vector: impl Into<Vector>) -> Self {
self.0.insert(name.into(), vector.into());
self
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please keep it, it's a part of public edge API.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reviving here #8925

Comment thread lib/edge/src/lib.rs
Comment on lines -171 to -179
/// This function removes edge-specific config and closes the shard.
/// Removing config might be necessary to avoid incompatibilities on snapshot recovery.
pub fn drop_and_clean_config(self) -> OperationResult<()> {
let config_path = self.path.join(EDGE_CONFIG_FILE);
if config_path.exists() {
fs_err::remove_file(self.path.join(EDGE_CONFIG_FILE))?;
}
Ok(())
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Added in #8322 by @dancixx.
Should we keep it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@xzfc it was added by @generall in this commit: cf12a1e
That was the previous conversation: #8322 (comment)
Maybe this is just a utility function. @generall does that method still necessary?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't remember

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Merging with it removed now. We can always revive it from this PR. 👍

@xzfc

xzfc commented Apr 23, 2026

Copy link
Copy Markdown
Member

@timvisee timvisee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Removed some more bits in two follow up commits. Hope CI remains green, it's a bit hard to check all possible targets locally.

If not green, we can drop my commits.

Comment thread lib/edge/src/lib.rs Resolved
@qdrant qdrant deleted a comment from coderabbitai Bot Apr 24, 2026
@timvisee
timvisee force-pushed the delete-unused-code branch from b718277 to 9aa9616 Compare April 24, 2026 09:03
@qdrant qdrant deleted a comment from coderabbitai Bot Apr 24, 2026
@timvisee
timvisee merged commit 354bbb3 into dev Apr 24, 2026
15 checks passed
@timvisee
timvisee deleted the delete-unused-code branch April 24, 2026 09:44
timvisee added a commit that referenced this pull request May 8, 2026
* Delete unused code

* restore initialize_global

* drop BadShardSelection

* Remove now obsolete allow(dead_code) attributes

* Remove more dead code

---------

Co-authored-by: timvisee <[email protected]>
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.

6 participants