Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ReplicaRepairGroup Class for Grouping Replicas and Token Ranges #721

Closed
VictorCavichioli opened this issue Sep 19, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request PoC/Agent Tasks related to new generation of ecchronos as an agent

Comments

@VictorCavichioli
Copy link
Contributor

VictorCavichioli commented Sep 19, 2024

Story Description:
A new class, ReplicaRepairGroup, will be created to represent a group of replicas (nodes) and token ranges (vnodes) that need to be repaired together in a Cassandra cluster. This class will encapsulate important information such as the set of replicas, their token ranges, and the last time the repair was completed for this group. The class will provide functionality for iterating over token ranges, retrieving replica nodes, and getting datacenter information for the associated nodes.

Key Responsibilities:

  1. Group Repair Logic: Encapsulate the concept of a repair group, which contains both the replicas (nodes) involved in the repair and the token ranges that should be repaired together.
  2. Data Management: Store the last time the repair was completed, allowing the system to manage and track repair operations more effectively.
  3. Iteration and Information Retrieval: Provide methods to retrieve replica nodes, datacenters, and allow iteration over token ranges.

Acceptance Criteria:

Test Coverage: Unit tests are provided to validate the creation of a ReplicaRepairGroup and the functionality of the methods (e.g., retrieving replicas, iterating over token ranges).

Definition of Done:

  1. The ReplicaRepairGroup class is implemented and added to the relevant module.
  2. The class is immutable, ensuring that no changes can be made to the set of replicas or token ranges after the object is created.
  3. Unit tests validate the correctness of the class’s functionality, including replica and token range retrieval, datacenter extraction, and iteration over token ranges.
  4. The class integrates with any existing repair or replication logic, grouping token ranges and replicas for efficient repair operations.
  5. Code review and static code analysis are completed with no critical issues or warnings.
  6. The project builds successfully, and all tests pass.

Notes:

This class will play a crucial role in managing repair tasks in a distributed system by organizing nodes and their corresponding token ranges into repairable groups.

Related to #652

@VictorCavichioli VictorCavichioli added enhancement New feature or request PoC/Agent Tasks related to new generation of ecchronos as an agent labels Sep 19, 2024
@VictorCavichioli VictorCavichioli self-assigned this Oct 29, 2024
@VictorCavichioli
Copy link
Contributor Author

PR merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PoC/Agent Tasks related to new generation of ecchronos as an agent
Projects
None yet
Development

No branches or pull requests

1 participant