-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DGS-11414: add pagination for get all subjects #3455
base: 7.7.x
Are you sure you want to change the base?
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
This comment has been minimized.
This comment has been minimized.
0c4a776
to
29b3bf4
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @djibodu , left some comments
public int normalizeSchemaLimit(int suppliedLimit) { | ||
int limit = schemaSearchDefaultLimit; | ||
if (suppliedLimit > 0 && suppliedLimit <= schemaSearchMaxLimit) { | ||
limit = suppliedLimit; | ||
} | ||
return limit; | ||
} | ||
|
||
public int normalizeSubjectLimit(int suppliedLimit) { | ||
int limit = subjectSearchDefaultLimit; | ||
if (suppliedLimit > 0 && suppliedLimit <= subjectSearchMaxLimit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's combine these into one method that takes a default
public int normalizeLimit(int suppliedLimit, int defaultLimit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
schemaSearchMaxLimit
and subjectSearchMaxLimit
both belong to KafkaSchemaRegistry
so those limits can't be passed to a combined function from the resource classes and still require specific calls
core/src/main/java/io/confluent/kafka/schemaregistry/rest/resources/SubjectsResource.java
Outdated
Show resolved
Hide resolved
29b3bf4
to
d76b263
Compare
d76b263
to
692e7a0
Compare
What
Adding pagination for getAllSubjects. Default and max limit both set to 20,000
Checklist
References
JIRA:
Test & Review
Open questions / Follow-ups