We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b99117f commit 79f0fb6Copy full SHA for 79f0fb6
src/Storages/Kafka/StorageKafka2.cpp
@@ -210,6 +210,11 @@ void StorageKafka2::partialShutdown()
210
task->holder->deactivate();
211
}
212
is_active = false;
213
+ /// Reset the active node holder while the old ZooKeeper session is still alive (even if expired).
214
+ /// EphemeralNodeHolder stores a raw ZooKeeper reference, so resetting it here prevents a
215
+ /// use-after-free: setZooKeeper() called afterwards may free the old session, and the holder's
216
+ /// destructor would then access a dangling reference when checking zookeeper.expired().
217
+ replica_is_active_node = nullptr;
218
219
220
bool StorageKafka2::activate()
0 commit comments