Skip to content

Fixed commit hanging if commitOffset < readOffset#620

Merged
alex268 merged 1 commit intoydb-platform:masterfrom
alex268:master
Apr 1, 2026
Merged

Fixed commit hanging if commitOffset < readOffset#620
alex268 merged 1 commit intoydb-platform:masterfrom
alex268:master

Conversation

@alex268
Copy link
Copy Markdown
Member

@alex268 alex268 commented Apr 1, 2026

No description provided.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.59%. Comparing base (573806b) to head (7bbfaa4).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #620      +/-   ##
============================================
+ Coverage     69.49%   69.59%   +0.09%     
- Complexity     3167     3172       +5     
============================================
  Files           362      362              
  Lines         15455    15455              
  Branches       1628     1628              
============================================
+ Hits          10741    10756      +15     
+ Misses         4047     4033      -14     
+ Partials        667      666       -1     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a reader commit hang when a partition session is started with commitOffset < readOffset (e.g., when emulating retention / skipping old offsets), and re-enables the previously ignored integration test that was freezing in that scenario.

Changes:

  • Adjusts ReadPartitionSession initialization so commit-range tracking starts from the committed/commit offset rather than the read offset.
  • Updates ReadSession partition-session creation to align with the new ReadPartitionSession constructor semantics.
  • Re-enables readRetentionedTopicTest by removing @Ignore.

Reviewed changes

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

File Description
topic/src/test/java/tech/ydb/topic/impl/TopicReadersIntegrationTest.java Re-enables the retention/skip scenario integration test that previously froze.
topic/src/main/java/tech/ydb/topic/read/impl/ReadSession.java Separates readFrom vs commitTo offsets and wires the partition session with the commit offset.
topic/src/main/java/tech/ydb/topic/read/impl/ReadPartitionSession.java Changes constructor and initializes internal offset tracking from the committed/commit offset to prevent commit hangs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alex268 alex268 merged commit 5985b64 into ydb-platform:master Apr 1, 2026
14 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