Skip to content

Rebuild head cache when a background task fails - #933

Draft
stasimus wants to merge 3 commits into
masterfrom
headcache/fail-on-background-failure
Draft

stasimus wants to merge 3 commits into
masterfrom
headcache/fail-on-background-failure

Conversation

@stasimus

@stasimus stasimus commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Background-task failures in TopicCache were swallowed, leaving the head cache silently non-functional. Now a failed consumption/remove fiber, and the repartition (unknown-partition) case, evict the topic so the next get rebuilds it. Implements the "fail headcache" TODO; relates to #922. Test added.

@coveralls

coveralls commented Jul 19, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 30930566893

Coverage decreased (-0.01%) to 91.486%

Details

  • Coverage decreased (-0.01%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 305 coverage regressions across 57 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

305 previously-covered lines in 57 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
com/evolution/kafka/journal/KafkaConsumer.scala 25 50.0%
com/evolution/kafka/journal/replicator/PurgeExpired.scala 22 0.0%
com/evolution/kafka/journal/Journal.scala 20 79.7%
com/evolution/kafka/journal/replicator/DistributeJob.scala 15 78.0%
com/evolution/kafka/journal/JournalMetrics.scala 13 5.71%
com/evolution/kafka/journal/eventual/EventualJournal.scala 12 72.34%
com/evolution/kafka/journal/HeadCache.scala 12 84.04%
com/evolution/kafka/journal/eventual/ReplicatedPartitionJournal.scala 11 76.92%
com/evolution/kafka/journal/TopicCache.scala 11 88.64%
com/evolution/kafka/journal/eventual/ReplicatedKeyJournal.scala 9 76.36%

Coverage Stats

Coverage Status
Relevant Lines: 6617
Covered Lines: 6237
Line Coverage: 94.26%
Relevant Branches: 1464
Covered Branches: 1156
Branch Coverage: 78.96%
Branches in Coverage %: Yes
Coverage Strength: 1.65 hits per line

💛 - Coveralls

@mr-git
mr-git force-pushed the headcache/fail-on-background-failure branch from 5cc6ce8 to 0d16c72 Compare July 21, 2026 15:55
@stasimus stasimus closed this Jul 22, 2026
@stasimus stasimus reopened this Jul 22, 2026
@stasimus stasimus closed this Aug 4, 2026
@stasimus stasimus reopened this Aug 4, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@mr-git

mr-git commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

I tried the unit-test on code from main branch - it doesn't fail!

@stasimus, are you sure that we need this change?

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