Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix LockedPartitions without session #7736

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ydb/core/persqueue/read_balancer__balancing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ void TPartitionFamily::AfterRelease() {
Partitions.clear();
Partitions.insert(Partitions.end(), RootPartitions.begin(), RootPartitions.end());

LockedPartitions.clear();

ClassifyPartitions();
UpdatePartitionMapping(Partitions);
// After reducing the number of partitions in the family, the list of reading sessions that can read this family may expand.
Expand Down Expand Up @@ -1783,10 +1785,9 @@ void TBalancer::Handle(TEvPersQueue::TEvGetReadSessionsInfo::TPtr& ev, const TAc
pi->SetPartition(partitionId);

auto* family = consumer->FindFamily(partitionId);
if (family && family->LockedPartitions.contains(partitionId)) {
if (family && family->Session && family->LockedPartitions.contains(partitionId)) {
auto* session = family->Session;

Y_ABORT_UNLESS(session != nullptr);
pi->SetClientNode(session->ClientNode);
pi->SetProxyNodeId(session->ProxyNodeId);
pi->SetSession(session->SessionName);
Expand Down
Loading