Details
Description
Reported internally:
Doing a reindex via the CLI on a mailbox which contains ~24000 mails does not work. - heap out of memory issue Heap increased, then: - cassandra timeout when increasing heap Timeout increased, then: - heap out of memory issue Heap increased, then: - GC overhead limit exceeded
In ReIndexerImpl instead of doing a FULL read to reindex the all mailbox (AND all of the related data) we should rather do a first metadata query to load uids then perform subsequent single reads.
That is the root issue: trying to load 11 Go of mails in memory.
Furthermore, a simple error should not trigger the end of a ReIndexing.