refactor: replace ScrubberReport enum with optional clustering field … - #15
Merged
admitrievtsev merged 2 commits intoJul 15, 2026
Conversation
danisaev
reviewed
Jul 15, 2026
| use std::time::Duration; | ||
|
|
||
| pub use system::database::{Database, IterableDatabase}; | ||
| pub use system::database::{ContainerDatabase, Database, IterableDatabase}; |
There was a problem hiding this comment.
Чем обусловлено изменение данной строки я не понимаю, в таске про это не сказано ?
Contributor
Author
There was a problem hiding this comment.
Это связано с тем что был смерджен пуллреквест и эта строчка была добавлена чтобы избежать конфликта
danisaev
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…in ScrubMeasurements
Initially I tried to design a new measurement interface using a ScrubberReport enum with Generic and Sbc variants, to cleanly separate basic metrics from clustering-specific data. However, on review it became clear this violates the Open-Closed Principle: adding any new scrubber type like FBC would require modifying the public enum. It also introduces unnecessary abstraction for a codebase that currently has only two scrubber variants. Instead, I replaced the enum with a simple Option field on ScrubMeasurements. CopyScrubber and DumbScrubber return None, while a future SBC scrubber will populate it with Some(...). This way the interface stays a single struct with a single return type, and extension happens by growing ClusteringMeasurements rather than adding enum variants.