I'd like to add a regression test to trigger the race in
IMPALA-7033 more reliably, but it will involve doing some sleeps at specific places, so I'd like to add it after bikramjeet.vig commits a change that provides some infrastructure for that.
The race was:
1) Coordinator::Exec() takes the QueryState ExecResources reference count.
2) Coordinator sends out exec rpc to non-coordinator backend.
3) Some non-coordinator backend sends a failure report which invokes HandleExecStateTransition, which drops the coordinator's reference to the exec resources.
4) Coordinator sends out exec rpc to coordinator backend, which takes the exec resources reference and releases it. We don't expect the reference count to become non-zero after it has already gone through a cycle.
The fix for this race is included in https://gerrit.cloudera.org/#/c/10440