Skip to content

CMR-11492: Validate reindexer at production scale in WL - #2497

Open
daniel-zamora wants to merge 27 commits into
masterfrom
reindexer-work
Open

daniel-zamora wants to merge 27 commits into
masterfrom
reindexer-work

Conversation

@daniel-zamora

@daniel-zamora daniel-zamora commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Overview

What is the objective?

Introduces the cmr reindexer, a FastAPI service that drives bulk reindexing of cmr metadata by dispatching concept-update messages to the cmr indexer's SQS queue. Replaces the reindex functionality previously handled ad-hoc via the bootstrap service.

What are the changes?

  • new service (reindexer/) a fastAPI app with endpoints to trigger reindex by concept type, single concept, granules (all providers / by provider / by collection), with date filtering and job cancellation support
  • Oracle client that uses keyset pagination for granule streaming.
  • throttler worker thread that dequeues collection work items, streams granules from Oracle, and dispatches to the indexer queue via a token bucket rate limiter
  • ES health gate pauses dispatch when clusters are not green
  • Job tracking with dynamoDB tracked job state with heartbeat, progress counters, cancellation, stalled-job resume on startup, and mid-collection checkpoint for task recovery
  • SQS batch publishing
  • test suite with 450 unit tests

What areas of the application does this impact?

New standalone service.

Required Checklist

  • New and existing unit and int tests pass locally and remotely
  • clj-kondo has been run locally and all errors in changed files are corrected
  • I have commented my code, particularly in hard-to-understand areas
  • I have made changes to the documentation (if necessary)
  • My changes generate no new warnings

Additional Checklist

  • I have removed unnecessary/dead code and imports in files I have changed
  • I have cleaned up integration tests by doing one or more of the following:
    • migrated any are2 tests to are3 in files I have changed
    • de-duped, consolidated, removed dead int tests
    • transformed applicable int tests into unit tests
    • reduced number of system state resets by updating fixtures. Ex) (use-fixtures :each (ingest/reset-fixture {})) to be :once instead of :each

Comment thread reindexer/README.md

```json
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to see the original url that triggered this job -- not having it be required though if it's too much work to add now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you meant in the job status response? I thought you meant in the readme.

@daniel-zamora daniel-zamora Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add that it shouldnt be that big of a lift, if you mean the request url carried in the status response.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I mean the request url

Comment thread reindexer/README.md
Comment thread reindexer/tests/test_routes.py Outdated
Comment thread reindexer/tests/test_routes.py Outdated
Comment thread reindexer/tests/test_routes.py
Comment thread reindexer/tests/test_routes.py Outdated
Comment thread reindexer/tests/test_routes.py Outdated
Comment thread reindexer/tests/test_routes.py Outdated
Comment thread reindexer/tests/test_routes.py Outdated
Comment thread reindexer/tests/test_routes.py
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.

3 participants