Merge lp:~rye/ubuntuone-client/unique-check-is-unique into lp:ubuntuone-client

Proposed by Roman Yepishev
Status: Merged
Approved by: Guillermo Gonzalez
Approved revision: 706
Merged at revision: 710
Proposed branch: lp:~rye/ubuntuone-client/unique-check-is-unique
Merge into: lp:ubuntuone-client
Diff against target: 26 lines (+3/-2)
2 files modified
bin/ubuntuone-syncdaemon (+1/-1)
ubuntuone/syncdaemon/dbus_interface.py (+2/-1)
To merge this branch: bzr merge lp:~rye/ubuntuone-client/unique-check-is-unique
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Approve
Rodrigo Moya (community) Approve
Review via email: mp+35719@code.launchpad.net

Commit message

Use com.syncdaemon.SyncDaemon.UniqueInstance name to check for existing instance of syncdaemon.

Description of the change

This branch fixes the nautilus hang that happens after 30 seconds of logging in to the system. It allocates a different bus name so that libsyncdaemon clients will be notified about syncdaemon readiness only when it is really ready.

How to test:

Before and after patching and deploying updated ubuntuone-syncdaemon and dbus_interface.py
sudo sysctl vm.drop_caches=3
nautilus -q
u1sdtool --quit
nautilus
(other terminal) u1sdtool --connect
Try to do things in nautilus - depending on the amount of metadata to load nautilus can hang from several seconds to several minutes. During metadata loading phase desktop nautilus instance is also not redrawing leading to degraded experience.

With the patch applied there will be no such hang.

After you apply the changes there will be two syncdaemon instances on the bus - com.ubuntuone.SyncDaemon and com.ubuntuone.SyncDaemon.UniqueInstance serving as a reminder that in Natty the startup should be reworked.

To post a comment you must log in.
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

This looks great to me, and will solve a lot of the problems we have at startup. But the syncdaemon guys will have the final word, so just count my approval as a 'I like it' vote :-)

review: Approve
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

looks good

review: Approve
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-syncdaemon'
2--- bin/ubuntuone-syncdaemon 2010-09-13 18:11:02 +0000
3+++ bin/ubuntuone-syncdaemon 2010-09-16 19:03:20 +0000
4@@ -49,7 +49,7 @@
5 def is_already_running():
6 """ check if there is another instance registered in DBus """
7 bus = dbus.SessionBus()
8- request = bus.request_name(dbus_interface.DBUS_IFACE_NAME,
9+ request = bus.request_name(dbus_interface.DBUS_IFACE_UNIQUE_NAME,
10 dbus.bus.NAME_FLAG_DO_NOT_QUEUE)
11 return request == dbus.bus.REQUEST_NAME_REPLY_EXISTS
12
13
14=== modified file 'ubuntuone/syncdaemon/dbus_interface.py'
15--- ubuntuone/syncdaemon/dbus_interface.py 2010-09-15 20:35:11 +0000
16+++ ubuntuone/syncdaemon/dbus_interface.py 2010-09-16 19:03:20 +0000
17@@ -39,7 +39,8 @@
18 # pylint: disable-msg=C0103
19
20 DBUS_IFACE_NAME = 'com.ubuntuone.SyncDaemon'
21-DBUS_IFACE_SYNC_NAME = 'com.ubuntuone.SyncDaemon.SyncDaemon'
22+DBUS_IFACE_UNIQUE_NAME = DBUS_IFACE_NAME + '.UniqueInstance'
23+DBUS_IFACE_SYNC_NAME = DBUS_IFACE_NAME + '.SyncDaemon'
24 DBUS_IFACE_STATUS_NAME = DBUS_IFACE_NAME+'.Status'
25 DBUS_IFACE_EVENTS_NAME = DBUS_IFACE_NAME+'.Events'
26 DBUS_IFACE_FS_NAME = DBUS_IFACE_NAME+'.FileSystem'

Subscribers

People subscribed via source and target branches