lp://qastaging/~zyga/checkbox/fix-1318504
- Get this branch:
- bzr branch lp://qastaging/~zyga/checkbox/fix-1318504
Branch merges
- Daniel Manrique (community): Approve
-
Diff: 224 lines (+81/-92)1 file modifiedcheckbox-ng/checkbox_ng/service.py (+81/-92)
Related bugs
Related blueprints
Branch information
Recent revisions
- 3031. By Zygmunt Krynicki
-
checkbox-
ng:service: remove useless locking This patch removes all locks used by checkbox-ng's service code.
First some background about concurrent.
futures. _base.Future' s
add_done_callback() method:| add_done_
callback( self, fn)
| Attaches a callable that will be called when the future finishes.
|
| Args:
| fn: A callable that will be called with this future as its only
| argument when the future completes or is cancelled. The callable
| will always be called by a thread in the same process in which
| it was added. If the future has already completed or been
| cancelled then the callable will be called immediately. These
| callables are called in the order that they were added.The *essential* fact is that the thread eventually calls the callback is
always the same thread that was used to register the method.Since we have two threads here (basically, there are more but here only
two will interact):1) The thread running almost all the python code in service.py
and elsewhere. This is where we handle requests sent via DBus
2) The thread that just blocks on the job runner to finish.
This thread is created indirectly with multiprocessing used by
the highlevel module.The original intent of _result_lock was, to quote:
# A lock that protects access to :ivar:`_result` and
# :ivar:`_result_ future` from concurrent access from the thread that is
# executing Future callback which we register, the
# :meth:`_result_ ready() ` Which is entirely bogus as there are no threads like that. Had I known
there was the callback guarantee I would never had added that lock in
the first place.Fixes: https:/
/bugs.launchpad .net/plainbox/ +bug/1318504 Signed-off-by: Zygmunt Krynicki <email address hidden>
- 3029. By Sylvain Pineau
-
"automatic merge by tarmac [r=zkrynicki][bug=1315337][author=
sylvain- pineau] " - 3028. By Daniel Manrique
-
"tarmac-verify: fix setting of KEEP_DATA environment variable.
Without this fix, we use --keep-data all the time, making lxc much slower as it uses actual disk storage instead of blazing-fast tmpfs on ram. [r=roadmr]
[bug=][ author= roadmr] "
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://qastaging/checkbox