lp:~cmiller/desktopcouch/mother-forking-threads
- Get this branch:
- bzr branch lp:~cmiller/desktopcouch/mother-forking-threads
Branch merges
- Rick McBride (community): Approve
- Tim Cole (community): Approve
-
Diff: 243 lines (+88/-62)4 files modifiedbin/desktopcouch-pair (+2/-0)
bin/desktopcouch-service (+83/-45)
desktopcouch/pair/couchdb_pairing/dbus_io.py (+0/-2)
desktopcouch/replication.py (+3/-15)
Related bugs
Bug #524566: desktopcouch-service crashed with SIGSEGV | Critical | Fix Released | |
Bug #530605: gvfs-mount doesn't always work. gvfsd-smb starts using 100% cpu. | Critical | Invalid |
Related blueprints
Branch information
Recent revisions
- 144. By Chad Miller
-
Split desktopcouch-
service threads into to discrete processes, since
they do not depend on each other, and because multithreading breaks
with recent changes to libraries. (LP: #524566, #530605)For places we use DBus function calls, pull the DBus glib mainloop
setting close to the place we assign the mainloop to the twisted
reactor. - 143. By Chad Miller
-
Since replication takes a long time (and we are not clever enough yet to replicate asynchronously), all replication is pushed into a subthread so that we don't block DBus server calls on getPort and such.
However, for some GUI libraries, GUI functions are not allowed to be outside the main execution thread. Violating that causes undefined behavior.
We need access to the keyring data in replication, and 'gnomekeyring' may try to display an alert to the user, using GUI functions. Doing so from inside the replication thread, outside the main thread, can cause SEGV crashes in deep and mysterious parts of Python and libraries it uses.
Now, add a wrapper for those functions that can call GUI functions. First test what environment we're in and if in a subthread, ask the twisted reactor to run the target function in the main execution thread and return the values down to the subthread.
- 142. By Eric Casteleijn
-
RecordDict.items() did not return properly wrapped data.
This in turn exposed an IMO more serious bug in CouchDatabaseBa
se.put_ records_ batch: that sends Record objects to python-couchdb instead of properly unwrapped dicts (i.e. Record._data). Fixed that bug as well. - 138. By Elliot Murphy
-
Use the built in json module in python2.6 when the simplejson module is not available.
- 137. By James Westby
-
Add with_auth and with_keyring arguments to Context.
If with_auth is False then a couch started in the created context won't require or accept credentials. This makes it not really a desktopcouch, but the facilities for starting and stopping couchdb with a restricted configuration can be hugely useful to other projects to use in e.g. test suites.
If with_keyring is False then the credentials won't be read from or stored to gnome-keyring, so that if it is a non-default context (e.g. in a testsuite) it doesn't intefere with the user's desktopcouch, as gnome-keyring is the only global object that Context interacts with.
Use a mock keyring during the tests to isolate them from the user more.
- 136. By Chad Miller
-
Revert feature of calling DBus on desktopcouch.
find_port( ) . This causes a problem with some threaded apps, like Gwibber. - 135. By Chad Miller
-
Add class to ubuntuone replication that allows one to set and unset and retreive exclusions to what is replicated to Ubuntu One servers.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:desktopcouch