Last Comment Bug 533776 - gloda indexes while offline, if we startup without a network connection. Suppress indexing on startup without network to conserve battery
: gloda indexes while offline, if we startup without a network connection. Sup...
: fixed-seamonkey2.0.4, perf, power
Product: MailNews Core
Classification: Components
Component: Database (show other bugs)
: 1.9.1 Branch
: x86 All
-- normal (vote)
: Thunderbird 3.1b1
Assigned To: Mark Banner (:standard8)
Depends on:
  Show dependency treegraph
Reported: 2009-12-09 11:03 PST by David :Bienvenu
Modified: 2014-02-10 13:32 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

The fix (1.98 KB, patch)
2010-02-16 07:34 PST, Mark Banner (:standard8)
bugmail: review+
standard8: approval‑thunderbird3.0.4+
Details | Diff | Splinter Review

Description User image David :Bienvenu 2009-12-09 11:03:16 PST
gloda relies on getting an online state change notification to suppress indexing while offline (offline is used as a proxy for battery use). If I startup without a network connection, gloda seems to miss or not get the notification.
Comment 1 User image Wayne Mery (:wsmwk, NI for questions) 2009-12-17 08:32:31 PST
is this all OS?  (don't have a handy test box ATM)
Comment 2 User image David :Bienvenu 2009-12-17 08:59:30 PST
probably it's all OS.
Comment 3 User image Dan Mosedale (:dmose) 2010-02-13 16:34:44 PST
This is likely to be perceived as a regression of sorts by laptop users, so marking as blocking 3.1 and aiming at rc1.
Comment 4 User image Mark Banner (:standard8) 2010-02-16 07:34:22 PST
Created attachment 427114 [details] [diff] [review]
The fix

This just checks the online/offline state when gloda is initialised and sets suppression of indexing if required.

Admittedly I've not done extensive testing to check that this works correctly, but from what I can tell whilst generating the unit test, this does what we expect for this case.
Comment 5 User image Andrew Sutherland [:asuth] 2010-02-17 08:35:05 PST
Comment on attachment 427114 [details] [diff] [review]
The fix

Yes, this is right, thank you.

The unit test didn't need to try and chain off of another set of unit tests; I fixed that and pushed it:
Comment 6 User image Andrew Sutherland [:asuth] 2010-02-17 08:36:42 PST
I decree this low risk to take on 3.0.x if you want it there too.  (I actually tested this on a 1.9.1 build because everything else is exploding.)
Comment 7 User image Mark Banner (:standard8) 2010-02-17 08:53:12 PST
Comment on attachment 427114 [details] [diff] [review]
The fix

Yeah, I thought it was low risk as well. Putting on the list to consider for approvals.
Comment 8 User image Mark Banner (:standard8) 2010-03-02 02:39:07 PST
Correcting 3.1 flags because this landed in time for beta 1.
Comment 9 User image Mark Banner (:standard8) 2010-03-11 05:14:55 PST
Comment on attachment 427114 [details] [diff] [review]
The fix

Two people agree this is low risk, so we'll take it on 3.0.4.
Comment 10 User image Mark Banner (:standard8) 2010-03-12 02:18:36 PST
Checked into 1.9.1:
Comment 11 User image Mark Banner (:standard8) 2010-03-13 01:49:41 PST
For some reason, the test was failing permanently on Windows (on just 3.0), therefore I've backed it out for now and will look again later:
Comment 12 User image Mark Banner (:standard8) 2010-03-17 01:05:58 PDT
After some testing, we added a change to the unit test to disable automatic management of offline mode (with r=asuth over irc):

Hence now landed on branch as well:
Comment 13 User image Ludovic Hirlimann [:Usul] 2010-03-18 01:44:02 PDT
on Mozilla/5.0 (Windows; U; Windows NT 5.1; gl; rv: Gecko/20100317 Thunderbird/3.0.4 I did the following :

 -> deleted the database
 -> Started thunderbird.

Activity manager still one item telling me that we are trying to determine which message to index.Shall I raise a new bug for that ?

Note You need to log in before you can comment on or make changes to this bug.