Thanks for the explanation, LGTM
On Wed, Jun 4, 2014 at 11:52 AM, Klaus Aehlig <[email protected]> wrote: > > > while True: > > > - ## TODO: use asynchronous wait instead of polling > > > - blockedon = > > > self.wconfd.Client().TryUpdateLocks(self._wconfdcontext, > > > - request) > > > - logging.debug("Requesting %s for %s blocked on %s", > > > - request, self._wconfdcontext, blockedon) > > > - if not blockedon: > > > + pending = > > > self.wconfd.Client().HasPendingRequest(self._wconfdcontext) > > > + if not pending: > > > break > > > time.sleep(random.random()) > > > > > > > Are we sure that the request is always fulfilled? If it gets cancelled, > the > > request is also removed from 'pending', right? > > If a request gets cancelled it is removed from pending. But who is there > to cancel it? While WConfD blindly trusts the client-id sent by the jobs, > all jobs only manipulate their own locks. And WConfD only cancels a request > if it can prove the job is dead (and all lock will be removed in this case > as well). > > > > + # timne since the last poll. > > > > > > > s/timne/time/ > > Sure, I will fix this. > > > Rest LGTM > > Thanks. > Klaus > > -- > Klaus Aehlig > Google Germany GmbH, Dienerstr. 12, 80331 Muenchen > Registergericht und -nummer: Hamburg, HRB 86891 > Sitz der Gesellschaft: Hamburg > Geschaeftsfuehrer: Graham Law, Katherine Stephens >
