While Prepare()-ing a fragment instance, if we fail to initialize the runtime filter bank, we will exit FIS::Prepare() without acquiring a thread token (AcquireThreadToken()):
FIS::Finalize() is called always regardless of whether the fragment instance succeeded or failed. And FIS::Finalize() tries to ReleaseThreadToken() even though it might not have gotten acquired:
, causing a DCHECK to be hit.
This was found while I was adding global debug actions (
IMPALA-7046) to the FIS.