[Bugs] #1936 HIGH: sugar.datastore.datastore.find() breaks for large data stores

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sun Apr 11 15:33:12 EDT 2010


#1936: sugar.datastore.datastore.find() breaks for large data stores
------------------------------+---------------------------------------------
    Reporter:  sascha_silbe   |          Owner:  erikos           
        Type:  defect         |         Status:  new              
    Priority:  High           |      Milestone:  0.88.x           
   Component:  sugar-toolkit  |        Version:  Git as of bugdate
    Severity:  Blocker        |       Keywords:                   
Distribution:                 |   Status_field:  New              
------------------------------+---------------------------------------------
 {{{sugar.datastore.datastore.find()}}} doesn't explicitly set a DBus
 timeout, so the (in)sanely short default timeout is used. This causes it
 to break with a DBus timeout error rather easily. E.g. even with all
 entries in cache(!), {{{find({})}}} always raises an error for a large
 data store:

 {{{
 Traceback (most recent call last):
   File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-activity", line
 21, in <module>
     main.main()
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/sugar/activity/main.py", line 159, in main
     create_activity_instance(activity_constructor, activity_handle)
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/sugar/activity/main.py", line 37, in create_activity_instance
     activity = constructor(handle)
   File "/home/sascha.silbe/sugar-
 jhbuild/install/share/sugar/activities/Janitor.activity/janitor.py", line
 112, in __init__
     self._setup_widgets()
   File "/home/sascha.silbe/sugar-
 jhbuild/install/share/sugar/activities/Janitor.activity/janitor.py", line
 116, in _setup_widgets
     self._setup_canvas()
   File "/home/sascha.silbe/sugar-
 jhbuild/install/share/sugar/activities/Janitor.activity/janitor.py", line
 123, in _setup_canvas
     self._create_list_model()
   File "/home/sascha.silbe/sugar-
 jhbuild/install/share/sugar/activities/Janitor.activity/janitor.py", line
 198, in _create_list_model
     self._refresh_list()
   File "/home/sascha.silbe/sugar-
 jhbuild/install/share/sugar/activities/Janitor.activity/janitor.py", line
 204, in _refresh_list
     jobjects = datastore.find({}, properties=self._properties)[0]
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/sugar/datastore/datastore.py", line 492, in find
     byte_arrays=True)
   File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in
 __call__
     **keywords)
   File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 630, in
 call_blocking
     message, timeout)
 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not
 receive a reply. Possible causes include: the remote application did not
 send a reply, the message bus security policy blocked the reply, the reply
 timeout expired, or the network connection was broken.
 }}}

 We should allow callers to specify a timeout and default to using a large
 value or even an infinite timeout (-1). If altering the function signature
 is too invasive for 0.88, we should backport at least the increased
 timeout.

 Other functions in {{{sugar.datastore.datastore}}} are likely to be
 affected as well.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1936>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list