KKcorps commented on code in PR #15299:
URL: https://github.com/apache/pinot/pull/15299#discussion_r2004862882


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java:
##########
@@ -1175,6 +1179,136 @@ public SuccessResponse updateTimeIntervalZK(
     return updateZKTimeIntervalInternal(tableNameWithType);
   }
 
+  @DELETE
+  @Produces(MediaType.APPLICATION_JSON)
+  @Path("/deletePauselessSegments/{tableName}")
+  @Authorize(targetType = TargetType.TABLE, paramName = "tableName", action = 
Actions.Table.DELETE_SEGMENT)
+  @Authenticate(AccessType.DELETE)
+  @ApiOperation(value = "Delete segments from a pauseless enabled table", 
notes =
+      "Deletes segments from a pauseless-enabled table based on the provided 
segment names. "
+          + "For each segment provided, it identifies the partition and 
deletes all segments "
+          + "with sequence numbers >= the provided segment in that partition. "
+          + "When force flag is true, it bypasses checks for pauseless being 
enabled and table being paused. "
+          + "The retention period controls how long deleted segments are 
retained before permanent removal. "
+          + "It follows this precedence: input parameter → table config → 
cluster setting → 7d default. "
+          + "Use 0d or -1d for immediate deletion without retention.")
+  public SuccessResponse deletePauselessSegments(
+      @ApiParam(value = "Name of the table with type", required = true) 
@PathParam("tableNameWithType")
+      String tableNameWithType,
+      @ApiParam(value = "List of segment names. For each segment, all segments 
with higher sequence IDs in the same "
+          + "partition will be deleted", required = true, allowMultiple = true)
+      @QueryParam("segments") List<String> segments,

Review Comment:
   Should we have another API or param where we can simply mention a partition 
and a sequnce number
   the api should then go ahead and do the same thing
   
   this is mostly from UX perspsective



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to