Give ECAppIter greenthreads a chance to wrap up

Otherwise, we can hit a "generator already executing" error in
test/functional/test_slo.py:TestSlo.test_slo_multi_ranged_get

Also, set a *slightly* newer lower-bound for greenlet (from 2011 instead
of 2010) so the sleep() doesn't cause us to lose exception state.

Change-Id: Id458fc0a43fd71aab9f6edbacc1f0b370c9f7537
This commit is contained in:
Tim Burke 2019-06-17 15:30:40 -07:00
parent 6a1b2de6bb
commit c19d09f60b
3 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ flake8==2.5.5
future==0.16.0
gitdb2==2.0.3
GitPython==2.1.8
greenlet==0.3.1
greenlet==0.3.2
hacking==0.11.0
idna==2.6
imagesize==1.0.0

View File

@ -4,7 +4,7 @@
dnspython>=1.15.0;python_version=='2.7' # http://www.dnspython.org/LICENSE
eventlet>=0.25.0 # MIT
greenlet>=0.3.1
greenlet>=0.3.2
netifaces>=0.8,!=0.10.0,!=0.10.1
PasteDeploy>=1.3.3
lxml>=3.4.1

View File

@ -38,7 +38,7 @@ from hashlib import md5
from swift import gettext_ as _
from greenlet import GreenletExit
from eventlet import GreenPile
from eventlet import GreenPile, sleep
from eventlet.queue import Queue
from eventlet.timeout import Timeout
@ -1066,6 +1066,7 @@ class ECAppIter(object):
# executing the internal_parts_iters.
if self.stashed_iter:
self.stashed_iter.close()
sleep() # Give the per-frag threads a chance to clean up
for it in self.internal_parts_iters:
close_if_possible(it)