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...
Status: RESOLVED FIXED
[battery]
: 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)
:
Mentors:
Depends on:
Blocks:
  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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
beta1+
beta1-fixed
-
.4-fixed


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

Description 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 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 David :Bienvenu 2009-12-17 08:59:30 PST
probably it's all OS.
Comment 3 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 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 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:
http://hg.mozilla.org/comm-central/rev/768179c0a19d
Comment 6 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 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 Mark Banner (:standard8) 2010-03-02 02:39:07 PST
Correcting 3.1 flags because this landed in time for beta 1.
Comment 9 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 Mark Banner (:standard8) 2010-03-12 02:18:36 PST
Checked into 1.9.1: http://hg.mozilla.org/releases/comm-1.9.1/rev/bc021a0272a8
Comment 11 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:

http://hg.mozilla.org/releases/comm-1.9.1/rev/befe8ee0f4e7
Comment 12 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):

http://hg.mozilla.org/comm-central/rev/79666fdca182

Hence now landed on branch as well:

http://hg.mozilla.org/releases/comm-1.9.1/rev/dd3eb945ce6e
http://hg.mozilla.org/releases/comm-1.9.1/rev/b8e06312e645
Comment 13 Ludovic Hirlimann [:Usul] 2010-03-18 01:44:02 PDT
on Mozilla/5.0 (Windows; U; Windows NT 5.1; gl; rv:1.9.1.9) 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.