Skip to content

[BI-2579] Refresh cache after import completes#448

Merged
nickpalladino merged 12 commits intodevelopfrom
feature/BI-2579
Apr 24, 2025
Merged

[BI-2579] Refresh cache after import completes#448
nickpalladino merged 12 commits intodevelopfrom
feature/BI-2579

Conversation

@jloux-brapi
Copy link
Collaborator

@jloux-brapi jloux-brapi commented Mar 18, 2025

Description

Story: BI-2579

To optimize the importing experience for germs, I've changed the code so that the cache only refreshes one time during the import process, at the end.

This idea of posting and refresing the cache from the response of a batch chunk being imported confuses me. Why would we not just refresh at the end of the process, or, since the cache refreshes everytime you view germplasm, is it done at all?

Maybe someone here can tell me a little bit more, but, when disabling this refreshing process, I found the performance of the import drastically improves. This is another problem that would also not exist if the cache were removed entirely and replaced with paginated requests for the data that needs to be viewed, but this can work as a stop-gap as the cache still exists.

Dependencies

This should be merged once the corresponding brapi prod server branch is merged.

Testing

Simply run a Germplasm import on a large dataset, and note the performance difference when enabled vs. disabled. Germs are still able to load when you view the Germplasm tab since it asks for a refresh anyways.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <please include a link to TAF run>

@jloux-brapi jloux-brapi changed the title [BI-2579] Disable cache refresh while importing [BI-2579] Refresh cache after import completes Mar 21, 2025
Copy link
Contributor

@mlm483 mlm483 left a comment

Choose a reason for hiding this comment

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

This change makes sense to me, I suggested a change to preserver current behavior.

I'll test this along with the BrAPI server changes as I review the BrAPI server changes.

Copy link
Contributor

@mlm483 mlm483 left a comment

Choose a reason for hiding this comment

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

Whenever we make changes to application.properties.template in the BrAPI server, we make corresponding changes to src/main/resources/brapi/properties/application.properties in bi-api.

I think it makes sense to do that in this PR. If you'd like me to make that change and push to this branch, let me know.

@jloux-brapi
Copy link
Collaborator Author

Whenever we make changes to application.properties.template in the BrAPI server, we make corresponding changes to src/main/resources/brapi/properties/application.properties in bi-api.

I think it makes sense to do that in this PR. If you'd like me to make that change and push to this branch, let me know.

I will add the properties that were added for each ticket. The BI-2578 ones I'll add to that bi-api MR, the 2579 ones I'll add here.

@jloux-brapi jloux-brapi requested a review from mlm483 March 31, 2025 20:28
@jloux-brapi
Copy link
Collaborator Author

Whenever we make changes to application.properties.template in the BrAPI server, we make corresponding changes to src/main/resources/brapi/properties/application.properties in bi-api.

I think it makes sense to do that in this PR. If you'd like me to make that change and push to this branch, let me know.

I think I'll add the newly added params for both MRs separately if that makes sense.

Copy link
Member

@nickpalladino nickpalladino left a comment

Choose a reason for hiding this comment

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

I thought maybe there was some case where data was expected to be in the cache but wasn't which is why it was done the previous way but testing seems to be working with the changes.

Base automatically changed from feature/BI-2578 to develop April 16, 2025 19:11
Copy link
Contributor

@mlm483 mlm483 left a comment

Choose a reason for hiding this comment

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

Tested, working.

@nickpalladino nickpalladino merged commit f4ff8b3 into develop Apr 24, 2025
1 check passed
@nickpalladino nickpalladino deleted the feature/BI-2579 branch April 24, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants