Skip to content

533. Fix race condition between onStartPartitionSession and onPartitionSessionClosed#605

Open
ekuvardin wants to merge 10 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 10 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-commenter commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.05%. Comparing base (28d9fed) to head (8f8b679).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #605      +/-   ##
============================================
+ Coverage     68.85%   69.05%   +0.19%     
- Complexity     3128     3138      +10     
============================================
  Files           355      355              
  Lines         15304    15306       +2     
  Branches       1621     1621              
============================================
+ Hits          10538    10569      +31     
+ Misses         4101     4069      -32     
- Partials        665      668       +3     

☔ 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
Contributor Author

Merge last trunk update

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