cryptoe commented on code in PR #18416:
URL: https://github.com/apache/druid/pull/18416#discussion_r2296686218
##########
server/src/main/java/org/apache/druid/metadata/SQLMetadataSupervisorManager.java:
##########
@@ -138,19 +138,29 @@ public Map<String, List<VersionedSupervisorSpec>> getAll()
}
@Override
- public List<VersionedSupervisorSpec> getAllForId(String id)
+ public List<VersionedSupervisorSpec> getAllForId(String id, @Nullable
Integer limit) throws IllegalArgumentException
{
+ if (limit != null && limit <= 0) {
+ throw new IllegalArgumentException("Limit must be greater than zero if
set");
Review Comment:
The end user is setting count but the exception message received by the end
user is talking about limit.
Since there can always be a variable name change, what we could do is to
this check in the :
https://github.com/apache/druid/blob/8f139bdf5fb5dead3fe02fe36f667faa0b81fb66/indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java#L534
that way we could control the end user message better.
Nit: We might want to add the limit passed just to aid debugging.
--
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]