Skip to content

533. Fix race condition between onStartPartitionSession and onPartitionSessionClosed#605

Open
ekuvardin wants to merge 8 commits intoydb-platform:masterfrom
ekuvardin:533.Сontrol-event-ordering

Hidden character warning

The head ref may contain hidden characters: "533.\u0421ontrol-event-ordering"
Open

533. Fix race condition between onStartPartitionSession and onPartitionSessionClosed#605
ekuvardin wants to merge 8 commits intoydb-platform:masterfrom
ekuvardin:533.Сontrol-event-ordering

Conversation

@ekuvardin
Copy link
Contributor

Connected to #553

AsyncReader.onStartPartitionSession can be called before AsyncReader.onPartitionSessionClosed due to race condition

By the way onStopPartitionSession managed by ydb core and after running some test examples couldn't find any races

I write two test
testEventOrderingGuarantees - guarantees in one reader
testSessionCloseRaceCondition - guarantees in two reader and simulate situation like in attached issues

@ekuvardin ekuvardin changed the title 533.сontrol event ordering 533. Fix race condition between onStartPartitionSession and onPartitionSessionClosed Mar 6, 2026
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.82%. Comparing base (597ebc0) to head (6246cba).

Files with missing lines Patch % Lines
...main/java/tech/ydb/topic/read/impl/ReaderImpl.java 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #605      +/-   ##
============================================
+ Coverage     68.65%   68.82%   +0.16%     
- Complexity     3096     3102       +6     
============================================
  Files           355      355              
  Lines         15305    15309       +4     
  Branches       1624     1626       +2     
============================================
+ Hits          10508    10536      +28     
+ Misses         4131     4102      -29     
- Partials        666      671       +5     

☔ 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.

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.

2 participants