Cannot open conversation from Gloda search result in some cases
Categories
(Thunderbird :: Instant Messaging, defect)
Tracking
(thunderbird_esr6869+ fixed, thunderbird69 fixed, thunderbird70 fixed)
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
Details
Attachments
(1 file, 1 obsolete file)
|
1.93 KB,
patch
|
florian
:
review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
One of the nice things of Gloda is that it indexes chat conversations and can find and open them. However, I'm seeing this weird issue now for the first time.
I was looking for "pike" in my chat history and found 42 hits in IRC. Some can be opened, some can't. For example one from #developers on 09 Jan 2018 opens fine, but one from #maildev on 5 February 2019 doesn't open, in fact, all hits from #maildev don't seem to open.
There's an error on the console:
TypeError: logTime is undefined - logger.js:742:11
which is here:
https://searchfox.org/comm-central/rev/eb044a1bc9fca62c103b25e77dfccb9adcf8a9c4/chat/components/src/logger.js#742
I'm not sure how it can be undefined since it was set a line above:
let [logTime] = getDateFromFilename(OS.Path.basename(path));
I checked on disk and the file is there:
D:\MAIL-THUNDERBIRD\jorgk.default\logs\irc\jorgk@irc.mozilla.org\#maildev.chat>dir 2019-02-05*
Volume in drive D has no label.
Volume Serial Number is 7E0E-9CA4
Directory of D:\MAIL-THUNDERBIRD\jorgk.default\logs\irc\jorgk@irc.mozilla.org\#maildev.chat
[stuff deleted]
06 Feb 2019 01:05 8,769 2019-02-05.230651+0100.json
11 File(s) 28,967 bytes
0 Dir(s) 158,148,448,256 bytes free
D:\MAIL-THUNDERBIRD\jorgk.default\logs\irc\jorgk@irc.mozilla.org\#maildev.chat>grep -i pike 2019-02-05*
2019-02-05.230651+0100.json:{"date":"2019-02-05T22:24:39.000Z","who":"Pike","text":"of all the places","flags":["incoming"]}
I've checked in the Gloda database, and it knows the log file:
select path from imConversations where path like "%maildev%2019-02-05%"
[mote hits]
irc/jorgk@irc.mozilla.org/#maildev.chat/2019-02-05.230651+0100.json
So where is this going wrong?
| Assignee | ||
Comment 1•6 years ago
|
||
Doesn't work in TB 60 either, so not a recent regression.
| Assignee | ||
Comment 2•6 years ago
|
||
OK, found it. I had dropped a file into the logs directory which turned up in the loop here:
https://searchfox.org/comm-central/rev/eb044a1bc9fca62c103b25e77dfccb9adcf8a9c4/chat/components/src/logger.js#736-748
but didn't match the wildcard here:
https://searchfox.org/comm-central/rev/eb044a1bc9fca62c103b25e77dfccb9adcf8a9c4/chat/components/src/logger.js#409
Effect, the entire thing falls apart. Maybe we should be a little more accepting.
| Assignee | ||
Comment 3•6 years ago
|
||
OK, no one should mess with those logs, but I did some searching and sorting in there and left some files behind. There's no harm in skipping unrecognised files.
I don't know who wants to review this, I'll try Florian first, this only needs visual inspection.
Comment 4•6 years ago
|
||
| Assignee | ||
Comment 5•6 years ago
|
||
Like this? Console says:
Found log file with name not maching YYYY-MM-DD.HHmmSS+ZZzz.format: all-chat.txt
Comment 6•6 years ago
|
||
| Assignee | ||
Comment 7•6 years ago
|
||
There shouldn't be any, otherwise this bug would have been filed before. I'm likely the only persons processing those log files and leaving undesired files behind in the directory. BTW, I strung all the small log files together to one big file with cat since grepping through a large file is much faster then grepping through 6000+ small files which the file system has to open individually. Also for Gloda to open the log in question takes a few seconds since it's processing many log files in the directory.
Are there any plans to switch form one log file per session to something more compact? Also for backup it's not convenient to have all those small log files.
As for the patch: I considered switching to Services.console.logStringMessage() but that doesn't stand out in the log.
| Assignee | ||
Updated•6 years ago
|
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/1b4f6fdfb4f0
Handle 'foreign' files in logs directory gracefully. r=florian
| Assignee | ||
Comment 9•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 10•6 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #7)
Are there any plans to switch form one log file per session to something more compact? Also for backup it's not convenient to have all those small log files.
I used to want to automatically compress the old log files into one gzip file per month. But I don't expect to work on this any time soon, if ever.
The fact that you need to grep shows that something is broken with the search. And I happen to sometimes grep my log folder too, so I would probably want search to be fixed (which could involve replacing gloda with something simpler and more efficient) before we compress logs on disk.
Comment 11•6 years ago
|
||
| Assignee | ||
Comment 12•6 years ago
|
||
Sorry about the trailing spaces, they're barely visible in splinter now, filed bug 1575001.
| Assignee | ||
Comment 13•6 years ago
|
||
The fact that you need to grep shows that something is broken with the search.
Well, the other day I was looking for something I thought should have been there. Gloda didn't find it, and neither did grep, so it was just in my head :-(
| Assignee | ||
Comment 14•6 years ago
|
||
TB 69 beta 4:
https://hg.mozilla.org/releases/comm-beta/rev/f513420103a459fa43ee6d3739b4434c52e959b0 (landed without the trailing spaces)
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 15•6 years ago
|
||
TB 68.1 ESR:
https://hg.mozilla.org/releases/comm-esr68/rev/6373f14f49e24bc2e4dc614fd3c3017fd7058de4
Description
•