Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 0.7
-
None
-
None
Description
If DataStreamSender::Init fails because a channel could not be created, the enclosing PlanFragmentExecutor will call DataStreamSender::Close in its destructor.
DataStreamSender::Close calls DataStreamSender::Channel::Close which tries to use its client_ object, which may not be correctly initialised. Then when using it fails, ClientCache::Reopen gets called, which fails a DCHECK because the client was never handed out by the cache in the first place.
Failure to connect to a backend will be common, so this bug will get tripped a lot. We should either avoid calling Close on a bad Channel, or make sure the Channel::Close is robust to the possibility of being in a bad state.
There's a handy TODO in data-stream-sender.cc: // TODO: only close channels that didn't have any errors. It is remarkably prescient.