If BackgroundThread object has never been started, calling wait() on it will crash since worker_threads won't contain a thread for this worker. This PR adds a safety check around that case.
We discovered it the hard way, with confluent kafka system tests. Debugging this issue was not straightforward for some reason, since the exception is silenced by ducktape (this is another problem not tackled by this PR).
This PR also adds a couple of useful debug lines which we added when debugging an issue with confluent system tests.
If BackgroundThread object has never been started, calling
wait()
on it will crash since worker_threads won't contain a thread for this worker. This PR adds a safety check around that case.We discovered it the hard way, with confluent kafka system tests. Debugging this issue was not straightforward for some reason, since the exception is silenced by ducktape (this is another problem not tackled by this PR).
This PR also adds a couple of useful debug lines which we added when debugging an issue with confluent system tests.