Skip to content

Commit

Permalink
Remove ability to request a repair with no notifications from the v2 …
Browse files Browse the repository at this point in the history
…repair endpoint.
  • Loading branch information
Miles-Garnsey authored and emerkle826 committed Oct 12, 2023
1 parent 8d61c58 commit da42b1a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions management-api-server/doc/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2137,9 +2137,6 @@
"keyspace" : {
"type" : "string"
},
"notifications" : {
"type" : "boolean"
},
"repair_parallelism" : {
"type" : "string",
"enum" : [ "sequential", "parallel", "dc_parallel" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public final Response repair(RepairRequest request) {
request.keyspace,
request.tables,
request.fullRepair,
request.notifications,
true,
getParallelismName(request.repairParallelism),
request.datacenters,
getRingRangeString(request.associatedTokens),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ public class RepairRequest {
@JsonProperty(value = "full_repair", defaultValue = "true")
public final Boolean fullRepair;

@JsonProperty(value = "notifications", defaultValue = "true")
public final Boolean notifications;

@Nullable
@JsonProperty(value = "associated_tokens")
public final List<RingRange> associatedTokens;
Expand All @@ -47,15 +44,13 @@ public RepairRequest(
@JsonProperty(value = "keyspace", required = true) String keyspace,
@JsonProperty(value = "tables") List<String> tables,
@JsonProperty(value = "full_repair", defaultValue = "true") Boolean fullRepair,
@JsonProperty(value = "notifications", defaultValue = "true") boolean notifications,
@JsonProperty(value = "associated_tokens") List<RingRange> associatedTokens,
@JsonProperty(value = "repair_parallelism") RepairParallelism repairParallelism,
@JsonProperty(value = "datacenters") List<String> datacenters,
@JsonProperty(value = "repair_thread_count") Integer repairThreadCount) {
this.keyspace = keyspace;
this.tables = tables;
this.fullRepair = fullRepair;
this.notifications = notifications;
this.associatedTokens = associatedTokens;
this.datacenters = datacenters;
this.repairParallelism = repairParallelism;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public void testRepairResourcesSuccess() throws Exception {
"keyspace",
Collections.singletonList("table1"),
false,
true,
Collections.singletonList(new RingRange("-100", "100")),
RepairParallelism.DATACENTER_AWARE,
Collections.EMPTY_LIST,
Expand Down Expand Up @@ -93,7 +92,6 @@ public void testRepairResourcesFail() throws Exception {
"",
tables,
false,
true,
Collections.EMPTY_LIST,
RepairParallelism.DATACENTER_AWARE,
Collections.EMPTY_LIST,
Expand Down

0 comments on commit da42b1a

Please sign in to comment.