Skip to content

CMR-11401 - refresh-collection-granule-aggregation-cache throwing Don't know how to create ISeq from: java.lang.Character error - #2555

Merged
jaortega527 merged 4 commits into
masterfrom
CMR-11401
Dec 3, 2026
Merged

jaortega527 merged 4 commits into
masterfrom
CMR-11401

Conversation

@jaortega527

@jaortega527 jaortega527 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Overview

What is the objective?

Fix refresh-collection-granule-aggregation-cache throwing java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Character in the indexer app, as seen intermittently in Splunk for the provider queue.

This isn't a rare edge case — it fails every time the partial cache refresh finds a collection whose granule temporal range actually changed (which is why it only shows up occasionally: most hourly partial refreshes find nothing to update).

What are the changes?

Root cause: In partial-cache-refresh, the call to index-service/bulk-index had its arguments swapped due to how ->> threads a value into the last argument position:

(->> updated-collections
     (meta-db/get-latest-concepts context)
     (map vector)
     (index-service/bulk-index context es-config/elastic-name))

bulk-index's signature is [context concept-batches es-cluster-name], but this threaded call passed the cluster name string "elastic" as concept-batches and the actual concept batches as es-cluster-name. bulk-index then reduces over the string "elastic" character by character, and prepare-batch calls pmap on each individual Character, which is what throws the ISeq exception.

  • Fixed the argument order by binding the batches to a local instead of threading into the final call, matching the correct usage pattern already present elsewhere in index_service.clj.
  • Added two unit tests covering partial-cache-refresh's reindex branch (previously untested), which fail against the old code and pass with the fix:
    • Confirms bulk-index is called with real concept batches (not Characters) and the cluster name in the correct argument position when a collection's temporal range changes.
    • Confirms bulk-index is not called when no collections changed.

What areas of the application does this impact?

  • indexer-app

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

…egalArgumentException: Don't know how to create ISeq from: java.lang.Character error
@jaortega527 jaortega527 changed the title Cmr 11401 CMR-11401 - refresh-collection-granule-aggregation-cache throwing Don't know how to create ISeq from: java.lang.Character error Dec 2, 2026
@jaortega527
jaortega527 marked this pull request as ready for review December 2, 2026 17:07
@codecov-commenter

codecov-commenter commented Dec 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.63%. Comparing base (30ced1d) to head (7604154).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2555      +/-   ##
==========================================
+ Coverage   54.60%   54.63%   +0.02%     
==========================================
  Files        1049     1049              
  Lines       73929    73929              
  Branches     2452     2450       -2     
==========================================
+ Hits        40368    40389      +21     
+ Misses      31245    31222      -23     
- Partials     2316     2318       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@daniel-zamora daniel-zamora left a comment

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.

Some testing nit picks.

@ibsenc ibsenc left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good, but just noting I don't see a test specifically for "Confirms bulk-index is not called when no collections changed."

@jaortega527
jaortega527 merged commit 9404a90 into master Dec 3, 2026
6 checks passed
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.

4 participants