Skip to content
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

Bug: When attributes are fetched using pagination pages can be empty or not full when items are skipped #9175

Open
1 task done
Benni0 opened this issue Jul 6, 2023 · 1 comment
Labels
needs triage This issue has been automatically labelled and needs further triage

Comments

@Benni0
Copy link
Contributor

Benni0 commented Jul 6, 2023

Expected behavior

When artifacts are fetched and enough attributes are available for the selected time, each page should be full except the last one.
This behavior is also expected when some attributes are skipped due enforceWarninglist or excludeDecayed.

Actual behavior

The amount of specified items for the specific page are fetched from the database and in the for loop each attribute which should be filtered is skipped. So the amount of returned attributes may be lower as the requested page size while matching attributes may exist on the next page.

Steps to reproduce

Fetch attributes using the REST API and use one of the filter, if there are some attributes which are skipped on one of the pages, the affected page has not as much attributes as requested.

Version

2.4.172

Operating System

CentOS

Operating System version

8

PHP version

7.4.30

Browser

No response

Browser version

No response

Relevant log output

No response

Extra attachments

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Benni0 Benni0 added the needs triage This issue has been automatically labelled and needs further triage label Jul 6, 2023
@Benni0 Benni0 mentioned this issue Jul 6, 2023
3 tasks
@iglocska
Copy link
Member

The current behaviour is intentional as certain elements are removed in the post-processing. Basically we pass back a header that signals whether there is more data to fetch (based on the intrnal fetch, so before the post-processing fires) so relying on that would be best. Looping would potentially be a massive performance overhead.

With that said, if you could reimplement the support for the looping to be an optional feature that needs to be passed in a parameter (such as ensurePageLimit or something to that effect) then we could merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has been automatically labelled and needs further triage
Projects
None yet
Development

No branches or pull requests

2 participants