Skip to content

STACAPIJobDatabase: faster counting, paging and existence check (#972) - #973

Open
omaraldulimay wants to merge 2 commits into
Open-EO:masterfrom
omaraldulimay:stac-job-db-performance-972
Open

omaraldulimay wants to merge 2 commits into
Open-EO:masterfrom
omaraldulimay:stac-job-db-performance-972

Conversation

@omaraldulimay

Copy link
Copy Markdown

Fixes #972

Changes to STACAPIJobDatabase and MultiBackendJobManager:

  • count_by_status() now uses the numberMatched value of the search response instead of fetching all items, with a fallback to the old behavior when the back-end does not provide it.
  • Searches request a page size of 1000 (search_page_size) instead of the server default (often 10), so far fewer requests are needed when paging through items.
  • exists() does a direct get_collection lookup instead of listing collections.
  • The job status histogram log message in MultiBackendJobManager is only built when INFO logging is enabled, which avoids a needless count_by_status() call.

Tests:

  • Added and updated unit tests in tests/extra/job_management/test_stac_job_db.py, including the numberMatched fallback.
  • tests/extra/job_management/: 192 passed.
  • Full suite: all passed except tests/extra/artifacts, which errors in this environment on a moto/AWS bucket location setting, unrelated to this change.
  • CHANGELOG entry added under Unreleased.

This PR was drafted with the help of Claude Code.

omaraldulimay and others added 2 commits November 13, 2026 15:00
…-EO#972)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…versions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve the performance of STAC based back-end

1 participant