Eric Wong (Contractor, The Linux Foundation) [Tue, 27 Feb 2018 20:29:55 +0000 (20:29 +0000)]
v2writable: commit to skeleton via remote partitions
We need to ensure Xapian transaction commits are made to remote
partitions before associated commits hit the skeleton DB.
This causes unnecessary commits to be made to the skeleton DB;
but they're mostly harmless. Further work will be necessary
to ensure proper ordering and avoidance of unnecessary commits.
Eric Wong (Contractor, The Linux Foundation) [Tue, 27 Feb 2018 00:41:21 +0000 (00:41 +0000)]
rename SearchIdxThread to SearchIdxSkeleton
Interchangably using "all", "skel", "threader", etc. were
confusing. Standardize on the "skeleton" term to describe
this class since it's also used for retrieval of basic headers.
Eric Wong (Contractor, The Linux Foundation) [Thu, 22 Feb 2018 17:55:35 +0000 (17:55 +0000)]
v2writable: round-robin to partitions based on article number
Instead of relying on the git object_id hash to partition,
round-robin to these partitions based on the NNTP article
number. This reduces the partition pipes as a source of
contention when two (or more) sequential messages end up
going to the same partition.
Eric Wong (Contractor, The Linux Foundation) [Thu, 22 Feb 2018 01:49:08 +0000 (01:49 +0000)]
v2: parallelize Xapian indexing
The parallelization requires splitting Msgmap, text+term
indexing, and thread-linking out into separate processes.
git-fast-import is fast, so we don't bother parallelizing it.
Msgmap (SQLite) and thread-linking (Xapian) must be serialized
because they rely on monotonically increasing numbers (NNTP
article number and internal thread_id, respectively).
We handle msgmap in the main process which drives fast-import.
When the article number is retrieved/generated, we write the
entire message to per-partition subprocesses via pipes for
expensive text+term indexing.
When these per-partition subprocesses are done with the
expensive text+term indexing, they write SearchMsg (small data)
to a shared pipe (inherited from the main V2Writable process)
back to the threader, which runs its own subprocess.
The number of text+term Xapian partitions is chosen at import
and can be made equal to the number of cores in a machine.
Eric Wong (Contractor, The Linux Foundation) [Thu, 22 Feb 2018 17:55:36 +0000 (17:55 +0000)]
import_vger_from_mbox: use PublicInbox::MIME and avoid clobbering
It is less confusing without the clobber assignment; and
PublicInbox::MIME exists to workaround bugs in older
Email::MIME (which is in Debian 9 (stretch))
Eric Wong (Contractor, The Linux Foundation) [Mon, 19 Feb 2018 20:07:11 +0000 (20:07 +0000)]
git: reload alternates file on missing blob
Since we'll be adding new repositories to the `alternates' file
in git, we must restart the `git cat-file --batch' process as
git currently does not detect changes to the alternates file
in long-running cat-file processes.
Don't bother with the `--batch-check' process since we won't be
using it with v2.
Eric Wong (Contractor, The Linux Foundation) [Sat, 17 Feb 2018 10:19:47 +0000 (10:19 +0000)]
v2writable: initial cut for repo-rotation
Wrap the old Import package to enable creating new repos based
on size thresholds. This is better than relying on time-based
rotation as LKML traffic seems to be increasing.
Eric Wong (Contractor, The Linux Foundation) [Fri, 16 Feb 2018 02:59:11 +0000 (02:59 +0000)]
search: stop assuming Message-ID is unique
In general, they are, but there's no way for or general purpose
mail server to enforce that. This is a step in allowing us
to handle more corner cases which existing lists throw at us.
Eric Wong (Contractor, The Linux Foundation) [Thu, 15 Feb 2018 01:10:06 +0000 (01:10 +0000)]
import: pass "raw" dates to git-fast-import(1)
For LKML, it appears we need an even more liberal parser than
RFC2822 date parser in git. I have not validated Date::Parse
parses dates correctly, but this at least prevents
git-fast-import(1) from choking.
Eric Wong (Contractor, The Linux Foundation) [Thu, 15 Feb 2018 00:25:53 +0000 (00:25 +0000)]
address: extract more characters from email addresses
There's a lot of weird characters which show up in LKML archives
which we did not support before. Furthermore, allow spaces
before the '>' in the From: line as at least some non-spam
poster used it.
Eric Wong (Contractor, The Linux Foundation) [Tue, 13 Feb 2018 03:02:56 +0000 (03:02 +0000)]
search: free up 'Q' prefix for a real unique identifier
This will allow easier-compatibility with v2 code which will
introduce content_id as the unique identifier.
The old "XMID" becomes "XM" as a free text searchable term.
"Q" becomes "XMID" as a boolean prefix.
There's no user-visible changes in this, but there needs to
be a schema version bump later on...
(more changes planned which can affect v1)
Eric Wong (Contractor, The Linux Foundation) [Tue, 13 Feb 2018 18:39:40 +0000 (18:39 +0000)]
scripts/import_vger_from_mbox: support --dry-run option
This can be useful for getting baseline of performance
of just Email::MIME and Date: header parsing. We'll need
to do some Date: header parsing for LKML since there are
some wonky date formats which causes the git RFC822 parser
to choke.
Eric Wong (Contractor, The Linux Foundation) [Thu, 8 Feb 2018 03:49:51 +0000 (03:49 +0000)]
scripts/import_vger_from_mbox: relax From_ line match slightly
The mboxes I got from cregit have two spaces after the email
address, while the "git format-patch" output I'm used to dealing
with only has one space.
It's still a "strict" match in that it checks for something
resembling a timestamp, but it relaxes the number of spaces
between the email address and date.
Eric Wong [Sat, 3 Feb 2018 02:50:46 +0000 (02:50 +0000)]
view: allow expanding directly to "nested" view
Sometimes, it can be desirable to jump directly to the "nested"
view when viewing a thread skeleton. This makes it possible.
While we're at it, shorten some of the text to ensure it still
fits in 80 columns.
Eric Wong [Tue, 30 Jan 2018 18:17:47 +0000 (18:17 +0000)]
view: close <pre> in reply instructions
We leave the mailto: link out when obfuscating address, so
do not stuff the "</pre>" closing tag into it. Instead,
keep the closing tag in the same context as the opening one,
making it easier to keep track of.
Eric Wong [Mon, 29 Jan 2018 11:49:56 +0000 (11:49 +0000)]
view: adjust wording for reply-to-list configs
This makes the wording less confusing when showing archives
for lists where the convention is reply-to-list.
I still hate reply-to-list, but it's still better than no
archives or list at all.
Eric Wong [Thu, 25 Jan 2018 06:30:03 +0000 (06:30 +0000)]
doc/design_www: adjust some wording and URLs around CSS
I still hate that CSS is over-used, but colors are useful
and perhaps using them for highlighting won't be too bad;
but user-supplied colors will ALWAYS be supported.
Eric Wong [Tue, 16 Jan 2018 05:08:22 +0000 (05:08 +0000)]
hval: only allow domain obfuscation in address
Obfuscating username portions of the email address leads
to having subsequent parts of the address not being obfuscated;
which could mean we show someone else's email entirely.
In other words, obfuscating "john.doe@example.com" becomes
might mean "doe@example.com" is picked up by scanners.
In other news, email address obfuscation is still a horrible
usability issue and only exists to appease misguided people.
Eric Wong [Thu, 16 Nov 2017 18:48:39 +0000 (18:48 +0000)]
learn: use "spam" as subject for removal commits
Sometimes an email is an innocent removal "rm" for a
misdirected, off-topic post, while most removed messages are
"spam". Allow anybody to look at history and easily distinguish
the reason for removing the message.
Eric Wong [Tue, 3 Oct 2017 19:43:30 +0000 (19:43 +0000)]
search: try to fill in ghosts when generating thread skeleton
Since we attempt to fill in threads by Subject, our thread
skeletons can cross actual thread IDs, leading to the
possibility of false ghosts showing up in the skeleton.
Try to fill in the ghosts as well as possible by performing
a message lookup.
Eric Wong [Mon, 2 Oct 2017 22:19:16 +0000 (22:19 +0000)]
threading: deal with improperly-terminated References headers
We should not blindly join References and In-Reply-To headers
as a single string, because some messages can have an open
angle brace '<' in References: without a corresponding '>'.
Eric Wong [Mon, 26 Jun 2017 04:34:13 +0000 (04:34 +0000)]
tests: deal with the removal of '.' from @INC in newer Perl
Oops, this is needed for Perl 5.22 (tested 5.24.1) since '.'
was removed due to security problems. Fwiw, I consider this
change to Perl an overreaction and do not agree with it.
Eric Wong [Sat, 24 Jun 2017 07:33:44 +0000 (07:33 +0000)]
watch: improve fairness during full rescans
We need to ensure new messages are being processed
fairly during full rescans, so have the ->scan subroutine
yield and reschedule itself. Additionally, having a
long-running task inside the signal handler is dangerous
and subject to reentrancy bugs.
Due to the limitations of the Filesys::Notify::Simple interface,
we cannot rely on multiplexing I/O interfaces (select, IO::Poll,
Danga::Socket, etc...) for this. Forking a separate process
was considered, but it is more expensive for a mostly-idle
process.
So, we use a variant of the "self-pipe trick" via inotify (or
whatever Filesys::Notify::Simple gives us). Instead of writing
to our own pipe, we write to a file in our own temporary
directory watched by Filesys::Notify::Simple to trigger events
in signal handlers.
Eric Wong [Fri, 23 Jun 2017 20:23:07 +0000 (20:23 +0000)]
allow admins to configure non-obfuscated addresses/domains
We will also treat all known list addresses as non-obfuscated.
By setting publicinbox.noObfuscate in ~/.public-inbox/config,
this will allow users to disable address obfuscation on a
per-domain or per-address basis.
Eric Wong [Fri, 23 Jun 2017 03:39:08 +0000 (03:39 +0000)]
mbox: show application/mbox for obfuscated inboxes
Sigh, yet another place to handle obfuscation for misguided
people who expect it. Maybe this will do something to prevent
spammers from getting addresses, while still allowing the
"curl $URL | git am" use case to work.
Eric Wong [Fri, 23 Jun 2017 02:25:33 +0000 (02:25 +0000)]
reply: handle address obfuscation :<
We can show users a lightly-obfuscated Bourne shell command
for invoking "git send-email" for address obfuscation. However,
I'm not sure if the mailto: arg will work effectively since
URL encoding is probably too well-known to be effective.
Eric Wong [Fri, 23 Jun 2017 01:43:21 +0000 (01:43 +0000)]
searchidx: fallback to lookup on pre-set article numbers
Yet another hiccup from reusing pre-set article numbers on
various ruby-lang.org mailing lists. This was causing messages
to not appear to NNTP readers which use XOVER.
Eric Wong [Fri, 23 Jun 2017 00:47:23 +0000 (00:47 +0000)]
watchmaildir: deal with rejected (100) messages
The RubyLang filter is strict about what messages it rejects, so
the spam learning path will not auto-train or remove messages
missing X-Mail-Count headers.