Skip to content

533. Fix race condition between onStartPartitionSession and onPartitionSessionClosed#605

Open
ekuvardin wants to merge 13 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 13 commits intoydb-platform:masterfrom
ekuvardin:533.Сontrol-event-ordering

Conversation

@ekuvardin
Copy link
Copy Markdown
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
Copy Markdown

codecov-commenter commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.86%. Comparing base (41369f3) to head (3304ed3).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #605      +/-   ##
============================================
+ Coverage     70.58%   70.86%   +0.28%     
- Complexity     3291     3305      +14     
============================================
  Files           372      372              
  Lines         15640    15640              
  Branches       1638     1638              
============================================
+ Hits          11039    11084      +45     
+ Misses         3948     3896      -52     
- Partials        653      660       +7     

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

…rdering

# Conflicts:
#	topic/src/main/java/tech/ydb/topic/read/impl/AsyncReaderImpl.java
#	topic/src/main/java/tech/ydb/topic/read/impl/ReaderImpl.java
#	topic/src/main/java/tech/ydb/topic/read/impl/SyncReaderImpl.java
@ekuvardin
Copy link
Copy Markdown
Contributor Author

Merge last trunk update

@ekuvardin
Copy link
Copy Markdown
Contributor Author

Add only tests cause changes due to fix races goes in another branches

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