Skip to content

fix(inkless:switch): [KC-234] force-roll boundary segment at seal so idle switched topics tier their classic tail - #694

Merged
ivanyu merged 1 commit into
mainfrom
svv/ts-unification-close-after-seal
Jul 22, 2026
Merged

fix(inkless:switch): [KC-234] force-roll boundary segment at seal so idle switched topics tier their classic tail#694
ivanyu merged 1 commit into
mainfrom
svv/ts-unification-close-after-seal

Conversation

@viktorsomogyi

Copy link
Copy Markdown
Contributor

seal() froze LEO but left the boundary [base_active, seal) as the active segment. RLM only tiers closed segments, so an idle switched topic never copied its classic tail to remote. Force-roll the active segment after aborting transactions and setting _sealed so it becomes a tiering candidate.

Copilot AI 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.

Pull request overview

This PR fixes a classic→diskless switch edge case where sealing a partition froze LEO but left the boundary segment active, preventing RemoteLogManager from tiering the classic tail when the topic becomes idle (KC-234). It ensures the boundary becomes a closed segment by force-rolling after sealing, and adds an integration test to assert latest-tiered reaches the pre-switch seal offset even with no post-switch appends.

Changes:

  • Force-roll the active log segment during Partition.seal() so [base_active, LEO) becomes a closed tiering candidate.
  • Add a new integration test covering the “idle switched topic tiers classic tail” scenario (KC-234).
  • Refactor the integration test to reuse helper methods for large-record production, switching, and “tiered object exists” waiting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
core/src/main/scala/kafka/cluster/Partition.scala Rolls the active segment during sealing to make the classic tail eligible for RLM tiering.
core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java Adds KC-234 regression test and small helper refactors around switching and tiering evidence.

Comment thread core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java Outdated
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-close-after-seal branch from a52c931 to ce3383c Compare July 14, 2026 08:14
@viktorsomogyi
viktorsomogyi marked this pull request as ready for review July 14, 2026 12:50
…enable tiering

seal() froze LEO but left the boundary [base_active, seal) as the active
segment. RLM only tiers closed segments, so an idle switched topic never
copied its classic tail to remote. Force-roll the active segment after
aborting transactions and setting _sealed so it becomes a tiering candidate.

# Conflicts:
#	core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-close-after-seal branch from ce3383c to ea74d30 Compare July 16, 2026 07:53
@ivanyu ivanyu self-assigned this Jul 22, 2026
@ivanyu
ivanyu merged commit 8fa2221 into main Jul 22, 2026
6 of 7 checks passed
@ivanyu
ivanyu deleted the svv/ts-unification-close-after-seal branch July 22, 2026 12:54
giuseppelillo pushed a commit that referenced this pull request Jul 29, 2026
…enable tiering (#694)

seal() froze LEO but left the boundary [base_active, seal) as the active
segment. RLM only tiers closed segments, so an idle switched topic never
copied its classic tail to remote. Force-roll the active segment after
aborting transactions and setting _sealed so it becomes a tiering candidate.

# Conflicts:
#	core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java
giuseppelillo pushed a commit that referenced this pull request Jul 30, 2026
…enable tiering (#694)

seal() froze LEO but left the boundary [base_active, seal) as the active
segment. RLM only tiers closed segments, so an idle switched topic never
copied its classic tail to remote. Force-roll the active segment after
aborting transactions and setting _sealed so it becomes a tiering candidate.

# Conflicts:
#	core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java
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