On 5/17/22 12:17 PM, Shawn Heisey wrote:> I had made the change to CaffeineCache quite a while back.iiuc, solr8x still has support for *LRUCache classes, as well as CaffeineCache. in my 8x installs, i'd simply never noticed related search problems ... only after my 9x install, with the full deprecation of legacy cache(s), did I notice these ... /var/log/solr/solr.log.6:2022-05-17 10:08:09.402 ERROR (qtp1165791284-17) [ x:dovecot] o.a.s.s.CacheConfig Error instantiating cache => org.apache.solr.common.SolrException: Error loading class 'solr.search.LRUCache' /var/log/solr/solr.log.6:org.apache.solr.common.SolrException: Error loading class 'solr.search.LRUCache' /var/log/solr/solr.log.6:Caused by: java.lang.ClassNotFoundException: solr.search.LRUCache /var/log/solr/solr.log.6:2022-05-17 10:09:13.534 ERROR (qtp1165791284-23) [ x:dovecot] o.a.s.s.CacheConfig Error instantiating cache => org.apache.solr.common.SolrException: Error loading class 'solr.LRUCache' /var/log/solr/solr.log.6:org.apache.solr.common.SolrException: Error loading class 'solr.LRUCache' /var/log/solr/solr.log.6:Caused by: java.lang.ClassNotFoundException: solr.LRUCache /var/log/solr/solr.log.6:2022-05-17 10:09:13.556 ERROR (qtp1165791284-23) [ x:dovecot] o.a.s.s.CacheConfig Error instantiating cache => org.apache.solr.common.SolrException: Error loading class 'solr.FastLRUCache' /var/log/solr/solr.log.6:org.apache.solr.common.SolrException: Error loading class 'solr.FastLRUCache' /var/log/solr/solr.log.6:Caused by: java.lang.ClassNotFoundException: solr.FastLRUCache ...> I can come up with a new config that should work in 8.x, 9.x, and the current dev branch by almost anyone.CaffeineCache _should_ be a solution for both series. I'm just starting to do a bit of testing, but so far, indexing/search with Caffeine seems quicker, at least. I do not yet know in which case(s) CaffeineCache is _not_ an appropriate solution.> I should probably see if I can write some end to end instructions for installing Solr and configuring dovecot to use it.Having something well-vetted and doc'd will be useful.> Something that is missing from the current instructions is how to initiate a FULL reindex of all data in the dovecot install.Beyond looping over each $acct doveadm fts rescan -u ${acct} doveadm index -u ${acct} -q '*' ?
On 5/17/22 11:32, PGNet Dev wrote:>> Something that is missing from the current instructions is how to >> initiate a FULL reindex of all data in the dovecot install. > > Beyond looping over each $acct > > ?doveadm fts rescan -u ${acct} > ?doveadm index????? -u ${acct} -q '*'I hadn't seen the fts rescan before.? That was what I was missing to make things really clean.? Before I was deleting all the dovecot.*index* files, and now I don't need to do that.? This is my new script, with the old way commented out: --- #!/bin/sh DOVECOT_SOLR_URL_BASE="http://localhost:8983/solr/dovecot" #MAIL_ROOT=/var/vmail # DO NOT MODIFY BELOW # WITHOUT GOOD REASON # DEL_ALL_QUERY_XML="<delete><query>*:*</query></delete>" service dovecot stop curl \ ? "${DOVECOT_SOLR_URL_BASE}/update?commit=true&optimize=true" \ ? -H "Content-Type: text/xml" \ ? --data-binary "${DEL_ALL_QUERY_XML}" #find ${MAIL_ROOT} -name "dovecot.*index*" -print0 | xargs -0 rm -f service dovecot start doveadm force-resync -A '*' doveadm fts rescan -A doveadm index -A -q '*' --- The script stops Dovecot, wipes out the Solr index, then restarts Dovecot and does the doveadm commands necessary for a full reindex of all mailboxes, without specifying them one by one.? The force-resync probably isn't required, but I figure it can't hurt. I've tested this new version a few times.? Good thing a full reindex only takes about ten minutes for my system. Thanks, Shawn
On 5/17/2022 11:32 AM, PGNet Dev wrote:> CaffeineCache? _should_ be a solution for both series. > I'm just starting to do a bit of testing, but so far, indexing/search > with Caffeine seems quicker, at least. > I do not yet know in which case(s) CaffeineCache is _not_ an > appropriate solution.CaffeineCache was added in Solr 8.3.0.? So it is not available in all 8.x releases. https://issues.apache.org/jira/browse/SOLR-8241 I know more than a little bit about Solr's caches.? I am the author of LFUCache, added way back in Solr 3.6.0.? That is an extremely naive "intro to programming" implementation, but it works. https://issues.apache.org/jira/browse/SOLR-2906 Caffeine is a highly optimized and battle-tested cache, with very good performance.? Shortly after it was added to Solr, all the other cache implementations were deprecated, and then removed in 9.0.0.>> I should probably see if I can write some end to end instructions for >> installing Solr and configuring dovecot to use it. > > Having something well-vetted and doc'd will be useful.If I ever find any time I will definitely work on that. Thanks, Shawn