diff options
author | Dan Lambright <dlambrig@redhat.com> | 2015-12-16 15:28:57 -0500 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-12-25 05:13:05 -0800 |
commit | 4ec0e36fff703d156c52bada758b97eff86ce61c (patch) | |
tree | 89b9b8697e8ef7b76c1508549b80f5fa9a844d05 /libglusterfs/src | |
parent | 9a198ccd65c067e5269cbdfef0b8fab7073bc212 (diff) |
cluster/tier: do not block in synctask created from pause tier
We had run sleep() in the pause tier callback. Blocking within
a synctask is dangerous. The sleep() call does not inform
the synctask scheduler that a thread is no longer running.
It therefore believes it is running. If a second synctask already
exists, it may not be able to run. This occurs if the thread
limit in the pool has been reached.
Note the pool size only grows when a synctask is created, not
when it is moved from wait state to run state, as is the case
when an FOP completes. When the tier is paused during migration,
synctasks already exist waiting for responses to FOPs to the
server with high probability.
The fix is to yield() in the RPC callback, which will place
the synctask into the wait queue and free up a thread for the
FOP callback. A timer wakes the callback after sufficient
time has elapsed for the pause to occur.
This is a backport of 12987.
> Change-Id: I6a947ee04c6e5649946cb6d8207ba17263a67fc6
> BUG: 1267950
> Signed-off-by: Dan Lambright <dlambrig@redhat.com>
> Reviewed-on: http://review.gluster.org/12987
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Change-Id: I9bb7564d57d59abb98e89c8d54c8b1ff4a5fc3f3
BUG: 1274100
Reviewed-on: http://review.gluster.org/13078
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'libglusterfs/src')
0 files changed, 0 insertions, 0 deletions