refactor(anti-entropy): remove dead with_mode_a_scaling and stale disabled-test comment (bf-no1g0)
The NOTE/TODO comment in tests/p13_8_anti_entropy.rs claimed a test acceptance_4_mode_a_shard_partitioning existed-but-was-disabled due to an API mismatch (with_mode_a_scaling). No such test lives in that file (it jumps acceptance_3 -> bucket_isolation), and Mode A partitioning coverage already lives inline in src/anti_entropy.rs (test_mode_a_anti_entropy_partitioning plus the rendezvous minimal-reshuffling tests). Replaced the 4-line comment with a one-line pointer to where the coverage actually lives. Investigation also surfaced that with_mode_a_scaling itself is dead code: the method is never called anywhere in the repo, and the fields it writes (replica_group_id, num_pods) are write-only — never read. The live Mode A scaling path routes through ModeACoordinator (with_mode_a_coordinator, read in the run loop). Removed the method and its two orphaned fields. Verified: grep for with_mode_a_scaling|acceptance_4_mode_a_shard_partitioning under crates/ is empty; cargo build -p miroir-core succeeds; the external p13_8_anti_entropy acceptance tests (8) pass. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
0ade87a3de
commit
a39b0e9df5
2 changed files with 1 additions and 24 deletions
|
|
@ -468,10 +468,6 @@ pub struct AntiEntropyWorker {
|
|||
mode_a_coordinator: Option<Arc<ModeACoordinator>>,
|
||||
/// Total shards in the cluster (for Mode A scaling).
|
||||
_total_shards: u32,
|
||||
/// This pod's replica group ID (for Mode A scaling).
|
||||
replica_group_id: Option<u32>,
|
||||
/// Total number of pods in Mode A scaling.
|
||||
num_pods: Option<u32>,
|
||||
/// RF (replication factor) for Mode A scaling.
|
||||
_rf: usize,
|
||||
/// Whether TTL is enabled for expired document handling (plan §13.14 interaction).
|
||||
|
|
@ -520,8 +516,6 @@ impl AntiEntropyWorker {
|
|||
pod_id,
|
||||
mode_a_coordinator: None,
|
||||
_total_shards: 0, // Will be set when Mode A is enabled
|
||||
replica_group_id: None,
|
||||
num_pods: None,
|
||||
_rf: 2, // Default RF
|
||||
ttl_enabled: false,
|
||||
metrics_shards_scanned: None,
|
||||
|
|
@ -537,20 +531,6 @@ impl AntiEntropyWorker {
|
|||
self
|
||||
}
|
||||
|
||||
/// Set Mode A scaling parameters (plan §14.6).
|
||||
///
|
||||
/// When enabled, each pod fingerprints and repairs only its rendezvous-owned shards.
|
||||
///
|
||||
/// # Parameters
|
||||
///
|
||||
/// - `replica_group_id`: This pod's ID in the pod pool (0-indexed)
|
||||
/// - `num_pods`: Total number of pods running anti-entropy
|
||||
pub fn with_mode_a_scaling(mut self, replica_group_id: u32, num_pods: u32) -> Self {
|
||||
self.replica_group_id = Some(replica_group_id);
|
||||
self.num_pods = Some(num_pods);
|
||||
self
|
||||
}
|
||||
|
||||
/// Set metrics callbacks.
|
||||
pub fn with_metrics(
|
||||
mut self,
|
||||
|
|
|
|||
|
|
@ -238,10 +238,7 @@ async fn test_acceptance_3_cdc_suppression() {
|
|||
);
|
||||
}
|
||||
|
||||
// NOTE: Test acceptance_4_mode_a_shard_partitioning is disabled because it requires
|
||||
// the peer-discovery feature and ModeACoordinator. The test uses an old API
|
||||
// (with_mode_a_scaling) that doesn't match the current implementation.
|
||||
// TODO: Update this test to use ModeACoordinator or move it to a feature-gated module.
|
||||
// Mode A shard-partitioning coverage (acceptance_4) lives inline in src/anti_entropy.rs.
|
||||
|
||||
/// Test that bucket-based diff isolates divergence to ~1/256 of PK space.
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue