Merge pull request #61679 from evillique/fix-msan-issue

Fix use-of-uninitialized-value in HedgedConnections
This commit is contained in:
Alexey Milovidov 2024-03-21 18:09:40 +03:00 committed by GitHub
commit 14f45bfa74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -67,7 +67,6 @@ HedgedConnections::HedgedConnections(
}
active_connection_count = connections.size();
offsets_with_disabled_changing_replica = 0;
pipeline_for_new_replicas.add([throttler_](ReplicaState & replica_) { replica_.connection->setThrottler(throttler_); });
}

View File

@ -178,12 +178,12 @@ private:
std::queue<int> offsets_queue;
/// The current number of valid connections to the replicas of this shard.
size_t active_connection_count;
size_t active_connection_count = 0;
/// We count offsets in which we can't change replica anymore,
/// it's needed to cancel choosing new replicas when we
/// disabled replica changing in all offsets.
size_t offsets_with_disabled_changing_replica;
size_t offsets_with_disabled_changing_replica = 0;
Pipeline pipeline_for_new_replicas;