Add API pagination#423
Merged
petrutlucian94 merged 10 commits intocloudbase:masterfrom May 8, 2026
Merged
Conversation
a43834f to
f648dc1
Compare
petrutlucian94
commented
May 5, 2026
| return marker, limit | ||
|
|
||
|
|
||
| def get_sort_params(req, |
Member
Author
There was a problem hiding this comment.
Shared by most Openstack services.
petrutlucian94
commented
May 5, 2026
| setattr(lifecycle, 'updated_at', timeutils.utcnow()) | ||
|
|
||
|
|
||
| def process_sort_params( |
Member
Author
There was a problem hiding this comment.
Shared by most Openstack services.
6d2dda5 to
f1e7acb
Compare
claudiubelu
reviewed
May 8, 2026
d760176 to
f30e307
Compare
At the moment, listing endpoint instances is the only Coriolis API that supports pagination. For this reason, Coriolis clients often retrieve much more database records than needed, leading to poor performance. We're now adding pagination to other Coriolis APIs, starting with the transfer executions. A transfer can have a large amount of executions, especially in case of cron jobs. New optional parameters: * limit - the maximum number of entries to retrieve * marker - the last seen id, will not be retrieved again The pagination will be performed on the db API side, leveraging the "utils.paginate_query" helper from oslo_db.
Non-admin operations will be tenant scoped, which means that we don't have to care about other entries from the database.
claudiubelu
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At the moment, listing endpoint instances is the only Coriolis API that supports pagination. For this reason, Coriolis clients often retrieve much more database records than needed, leading to poor performance.
We're now adding pagination to other Coriolis APIs:
New optional parameters:
sort_key- sort key, repeatable.created_atandidare used by default.sort_dir- sort direction, repeatable.ascordesc(default).marker- the last seen ID, omitted from the results.limit- the maximum number of records to retrieve.The pagination will be performed on the db API side, leveraging the "utils.paginate_query" helper from oslo_db.
Example:
Note that the integration tests depend on the client changes: cloudbase/python-coriolisclient#98