arobinski opened a new pull request, #488:
URL: https://github.com/apache/solr/pull/488

   https://issues.apache.org/jira/browse/SOLR-15883
   
   # Description
   
   Currently the currency fields (specifically: fields of type 
`solr.CurrencyFieldType` that use `OpenExchangeRatesOrgProvider`) refresh the 
currency rates during a search request. If the openexchangerates.org service is 
unavailable or slow, all search requests (that use currencies) may fail.
   
   This MR introduces a new boolean parameter `refreshWhileSearching` to fields 
of type `solr.CurrencyFieldType` that have `providerClass` equal to 
`solr.OpenExchangeRatesOrgProvider`. If the parameter is true (default), it 
will work as before. If it's false, then currency rates will NOT be refreshed 
during a search request.
   
   Additionally, the MR introduces a new class: OpenExchangeRatesOrgReloader, 
which can listen to `newSearcher` and `firstSearcher` events and reload 
currency rates when a new searcher is opened. If you want to use the 
OpenExchangeRatesOrgReloader, it has to be added to solrconfig.xml.
   
   This is my first MR to the SOLR project and I am not sure if I did 
everything properly. I'd be grateful for a review from someone who knows the 
SOLR code better.
   
   # Solution
   
   Instead of refreshing currency rates during a search request, refresh them 
during commit. More information above.
   
   # Tests
   
   I modified one test and added one test to the 
OpenExchangeRatesOrgProviderTest class.
   
   I have run `./gradlew check` and the test 
ChaosMonkeyNothingIsSafeWithPullReplicasTest failed, but it seems not related 
to my changes.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms 
to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [x] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to