fix "pure virtual method called" in kafka_source#34
fix "pure virtual method called" in kafka_source#34vyskubov wants to merge 6 commits intobitbouncer:masterfrom
Conversation
|
the "while(!_started) |
|
The error "pure virtual method called" happens on 146 line. And now I caught it on patched version of kspp. So, it may be that we are calling a In my program I create and destroy the topology in a loop. So constructors and destructors a called pretty frequently. Here is a backtrace (frame 6): |
wait for kafka_source_base::thread_f() to finish before closing and destroying kafka_source
check exit condition in consuming loop
add specializations
|
That will do. Now segfault'd gone. Should I create new PR without mistakes or you squash these commits? Or you want to see more deeply why the error happens? |
Sometimes there happens a call to
kafka_source_base::parse()which is pure virtual.This patch moves initialization of
kafka_source::_threadfromkafka_source_baseinitializer list to a callkafka_source_base::start()whenkafka_source::thread_f()is available.