[
https://issues.apache.org/jira/browse/CASSSIDECAR-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986462#comment-17986462
]
Arjun Ashok edited comment on CASSSIDECAR-268 at 6/26/25 10:24 PM:
-------------------------------------------------------------------
Proposed API spec:
{code}
PUT /api/v1/cassandra/keyspaces/<keyspace>/repair
{code}
Note: all fields in the payload are optional.
|| Field || Type || Optional || Default
Value || Description
||
| tables | List<String> | true | []
| List of table names to repair; if empty, all tables in the keyspace are
repaired |
| isPrimaryRange | Boolean | true | false
| Whether to repair only the primary range owned by the node
|
| datacenter | String | true | null
| Restrict repair to nodes in a specific datacenter
|
| hosts | List<String> | true | []
| Restrict repair to specific hosts; by default it targets all natural
replicas for each token range owned by the node |
| startToken | Long | true | null
| Start token of the range to repair
|
| endToken | Long | true | null
| End token of the range to repair
|
| repairType | RepairType | true | "full" |
Type of repair to run; e.g., FULL or INCREMENTAL
|
| ignoreUnreplicatedReplicas| Boolean | true | false
| If true, skips replicas not replicated in all nodes
|
| force | Boolean | true | false
| Forces repair |
| validate | Boolean | true | true
| If true, performs validation before executing the repair
|
Sample input:
{code:json}
{
"tables": ["users", "orders", "inventory"],
"isPrimaryRange": true,
"datacenter": "us-west-2",
"hosts": ["192.168.1.10", "192.168.1.11"],
"startToken": 1234567890,
"endToken": 2234567890,
"repairType": "incremental",
"ignoreUnreplicatedReplicas": false,
"force": true,
"validate": true
}
{code}
was (Author: JIRAUSER301082):
Proposed API spec:
{code}
PUT /api/v1/cassandra/keyspaces/<keyspace>/repair
{code}
Note: all fields in the payload are optional.
Sample input:
{code:json}
{
"tables": ["users", "orders", "inventory"],
"isPrimaryRange": true,
"datacenter": "us-west-2",
"hosts": ["192.168.1.10", "192.168.1.11"],
"startToken": 1234567890,
"endToken": 2234567890,
"repairType": "incremental",
"ignoreUnreplicatedReplicas": false,
"force": true,
"validate": true
}
{code}
> Sidecar endpoint to support on-demand repair operation
> ------------------------------------------------------
>
> Key: CASSSIDECAR-268
> URL: https://issues.apache.org/jira/browse/CASSSIDECAR-268
> Project: Sidecar for Apache Cassandra
> Issue Type: Improvement
> Reporter: Arjun Ashok
> Assignee: Arjun Ashok
> Priority: Major
>
> This proposal is part of an effort to introduce bespoke Sidecar APIs to
> support key operational functionality currently managed through nodetool
> commands. Introducing these APIs offers several benefits:
>
> Strong Contract Definition: APIs provide a well-defined contract for both
> request and response structures, reducing errors in operational tooling by
> eliminating the need to parse command results.
> Error Handling: A clear response contract allows for meaningful error
> messages to be communicated to clients, without exposing internal
> implementation details.
> Input Validation: APIs can incorporate input validation to enhance security
> by protecting against command injection attacks.
> Version Compatibility: By exposing a standardized interface, APIs ensure
> compatibility across different Cassandra versions, through the sidecar's
> abstraction.
> Access Control: APIs enable fine-grained access control, leveraging
> permissions and roles associated with client identities for precise
> authorization.
>
> This specific task introduces an endpoint that performs the repair operation
> for a given keyspace with several options ranging from the set of tables,
> token-range to be repaired, type of repair (incremental vs full) etc.. Since
> repair is a long-running operation, this API will leverage the async job
> management framework tracked in CASSANDRASC-150.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]