Skip to content

Commit

Permalink
Cherry pick commit offsets fix (#2451)
Browse files Browse the repository at this point in the history
  • Loading branch information
ildar-khisambeev authored Mar 5, 2024
1 parent fad6d73 commit c735d22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void TPartitionStreamImpl<UseMigrationProtocol>::Commit(ui64 startOffset, ui64 e
Commits.EraseInterval(0, endOffset); // Drop only committed ranges;
}
for (auto range: toCommit) {
sessionShared->Commit(this, range.first, range.second);
sessionShared->Commit(this, range.first, Min(range.second, endOffset));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1579,8 +1579,8 @@ Y_UNIT_TEST_SUITE(ReadSessionImplTest) {
}
for (const auto& range : req.offset_ranges()) {
Cerr << "RANGE " << range.start_offset() << " " << range.end_offset() << "\n";
if (range.start_offset() == 10 && range.end_offset() == 12) has1 = true;
else if (range.start_offset() == 0 && range.end_offset() == 10) has2 = true;
if (range.start_offset() == 3 && range.end_offset() == 12) has1 = true;
else if (range.start_offset() == 0 && range.end_offset() == 3) has2 = true;
else UNIT_ASSERT(false);
}
}));
Expand Down

0 comments on commit c735d22

Please sign in to comment.