potiuk commented on PR #34075:
URL: https://github.com/apache/airflow/pull/34075#issuecomment-1705263978
I think it will. The way it was before had almost guarantee that those races
will happen because we have not waited for the thread at all.
Here we give 30 seconds (way more than the 1 sec. Idle) for the thread to
complete. And this is all about to make it far far less probable and 'fast
enough' even if the thread hangs for some reason or the machine is very, very
busy.
In most cases even if the thread will hang for 30 s and we won't complete
waiting, nothing bad will happen. We would have to be really unlucky to get the
thread do something with session while we are closing it. Previously it was
just the question of how close to the end of the 1s sleep the thread was so If
the 'race window' was say 10ms - we woud have 1% chance to hit it. With 30
seconds time for the thread to complete IMHO the probability is wery low.
If we have infinite join and the thread does not complete, then we will fail
at 60s anyway with test timeout, and the test would fail in this case - even if
it would have side effects would be harmless, so I prefer to just 'let it go'
after half the time and continue hoping that the side effects won't kick in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]