Nir Soffer has posted comments on this change.

Change subject: schedule: Introduce scheduling libary
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/29607/4/lib/vdsm/schedule.py
File lib/vdsm/schedule.py:

Line 82:         """
Line 83:         Schedule callable to be called after delay seconds on the 
scheduler
Line 84:         thread.
Line 85: 
Line 86:         Callable must not block or take excessive time to complete. It 
it does
> Fine, but then what's the advantage of having a private executor thread ins
The advantage is that both scheduler and thread pool are decoupled, and you can 
build various solutions by mixing them or using them separately.

I prefer simple reusable parts that I can combine in smart ways over complex 
parts that I have to fight to make it do what I want and live with their bloat.

This achive your goals:
- scheduler does only scheduling, does not now anything about 
executors/threadpools
- threadpool/executor execute stuff

For example, lets say the thread pool as limited queue - who will handle the 
case where the queue is full?

We don't like the scheduler to deal with this, since it is not related to 
scheduling. *Your* code should deal with this case, therefore *your* code 
should schedule itself to dispatch a task on the threadpool, and it should know 
how to handle a full queue - for example, by delaying the scheduled task again, 
or failing, whatever. This is application policy and the scheduler does not 
care about it.
Line 87:         not finish quickly, it may delay other scheduled calls on the 
scheduler
Line 88:         thread.
Line 89: 
Line 90:         Returns a ScheduledCall that may be canceled if callable was 
not called


-- 
To view, visit http://gerrit.ovirt.org/29607
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3764806d93bd37c3b5924080eb5ae4d29e4f4e0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yoav Kleinberger <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to