Copilot commented on code in PR #19142:
URL: https://github.com/apache/pinot/pull/19142#discussion_r3696839996


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableInstances.java:
##########
@@ -158,28 +157,6 @@ public String getTableInstances(
     return ret.toString();
   }
 
-  @Deprecated
-  @GET
-  @Path("/tables/{tableName}/livebrokers")
-  @Authorize(targetType = TargetType.TABLE, paramName = "tableName", action = 
Actions.Table.GET_BROKER)
-  @Produces(MediaType.APPLICATION_JSON)
-  @ApiOperation(value = "List the brokers serving a table", notes = "List live 
brokers of the given table based on EV")
-  @ApiResponses(value = {
-      @ApiResponse(code = 200, message = "Success"),
-      @ApiResponse(code = 404, message = "Table not found"),
-      @ApiResponse(code = 500, message = "Internal server error")
-  })
-  public List<String> getLiveBrokersForTable(
-      @ApiParam(value = "Table name (with or without type)", required = true)
-      @PathParam("tableName") String tableName, @Context HttpHeaders headers) {
-    tableName = DatabaseUtils.translateTableName(tableName, headers);
-    try {
-      return _pinotHelixResourceManager.getLiveBrokersForTable(tableName);
-    } catch (TableNotFoundException e) {
-      throw new ControllerApplicationException(LOGGER, e.getMessage(), 
Response.Status.NOT_FOUND);
-    }
-  }
-
   @GET
   @Path("/tables/livebrokers")
   @Authorize(targetType = TargetType.CLUSTER, action = 
Actions.Cluster.GET_BROKER)

Review Comment:
   This endpoint declares 500 for internal server errors, but the 
implementation currently maps any exception to 404 NOT_FOUND. That can mislead 
clients (e.g., missing ExternalView, InstanceConfig parse issues) and 
contradicts the documented API responses.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to