Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMR-9498 Changed metadata cache from in-memory search only to redis where bootstrap loads the data in non dev environments #1993

Merged
merged 10 commits into from
Nov 10, 2023

Conversation

eereiter
Copy link
Contributor

@eereiter eereiter commented Nov 3, 2023

and search will load the data for development environments using in memory database. I pushed a lot of code to common so that both bootstrap and search can use the same functions when possible.

@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2023

Codecov Report

Merging #1993 (a220aec) into master (de4c9d6) will decrease coverage by 0.18%.
Report is 3 commits behind head on master.
The diff coverage is 20.00%.

@@            Coverage Diff             @@
##           master    #1993      +/-   ##
==========================================
- Coverage   55.26%   55.08%   -0.18%     
==========================================
  Files         992      995       +3     
  Lines       63036    63255     +219     
  Branches     1561     1566       +5     
==========================================
+ Hits        34836    34847      +11     
- Misses      26643    26846     +203     
- Partials     1557     1562       +5     
Files Coverage Δ
...h/data/metadata_retrieval/metadata_transformer.clj 41.89% <ø> (ø)
...pp-lib/src/cmr/common_app/services/kms_fetcher.clj 53.19% <50.00%> (ø)
...utils-lib/src/cmr/redis_utils/redis_hash_cache.clj 53.57% <0.00%> (ø)
...results_handlers/generics_json_results_handler.clj 4.05% <0.00%> (ø)
...h/services/humanizers/humanizer_report_service.clj 30.76% <0.00%> (ø)
...search/services/parameters/provider_short_name.clj 36.95% <0.00%> (ø)
...app-lib/src/cmr/common_app/services/cache_info.clj 43.58% <0.00%> (-1.15%) ⬇️
...rc/cmr/common/cache/single_thread_lookup_cache.clj 89.28% <91.66%> (-0.72%) ⬇️
search-app/src/cmr/search/system.clj 18.29% <0.00%> (-0.23%) ⬇️
...pp/data/metadata_retrieval/revision_format_map.clj 57.60% <63.63%> (ø)
... and 9 more

Copy link
Contributor

@daniel-zamora daniel-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has changing this cache to use redis been evaluated for performance? In production, we only use a single node redis cluster, will this need to be expanded(how large will the cache be and how often does it get accessed)?

@eereiter
Copy link
Contributor Author

eereiter commented Nov 10, 2023

Has changing this cache to use redis been evaluated for performance? In production, we only use a single node redis cluster, will this need to be expanded(how large will the cache be and how often does it get accessed)?

No, we have not done performance tests with changing this cache from memory to redis. In production we have increased the redis nodes from 1 primary to 3; 1 primary and 2 replicas. This cache is used to satisfy collection umm_json search requests - all other concept types still go to the database - that code hasn't changed. I have read that we should get micro-second performance out of redis, but I haven't tested it to see if that is true.

@eereiter eereiter merged commit e175992 into master Nov 10, 2023
2 of 3 checks passed
eereiter added a commit that referenced this pull request Dec 6, 2023
…here bootstrap loads the data in non dev environments (#1993)

* CMR-9498 Moving the collection metadata cache from in memory to redis.

* CMR-9498 fixing test errors.

* CMR-9498 fixing some issues between the older caches vs the new hash cache.

* CMR-9498 adding back in coded needed for integration tests.

* CMR-9498-1 Fixing system integration test

* CMR-9498 Fixing left debug statements

* CMR-9498 fixing tests.

* CMR-9498 Fixing integration tests.

* CMR-9498 Fixing PR suggestions.

* CMR-9498 updating code to satisfy PR requests.
@eereiter eereiter deleted the CMR-9498-1 branch December 12, 2023 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants