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

BFD-3566: Add materialized view for tracking the current beneficiary for an xref group #2398

Draft
wants to merge 10 commits into
base: BFD-3550
Choose a base branch
from

Conversation

aschey-forpeople
Copy link
Contributor

@aschey-forpeople aschey-forpeople commented Aug 6, 2024

JIRA Ticket:
BFD-3566

What Does This PR Do?

  • Creates a materialized view ccw.current_beneficiaries that tracks the current beneficiary for each xref group (see comments in SQL file for details)
  • Refreshes the materialized view when the beneficiary RIF has finished processing

What Should Reviewers Watch For?

If you're reviewing this PR, please check for these things in particular:

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

  • Adds any new software dependencies

  • Modifies any security controls

  • Adds new transmission or storage of data

  • Any other changes that could possibly affect security?

  • I have considered the above security implications as it relates to this PR. (If one or more of the above apply, it cannot be merged without the ISSO or team security engineer's (@sb-benohe) approval.)

Validation

Tested in an ephemeral environment - re-ran the pipeline load, ensured view was refreshed.

@aschey-forpeople aschey-forpeople marked this pull request as ready for review August 7, 2024 16:51
/** Refreshes the current beneficiaries materialized view. */
private void refreshCurrentBeneficiariesView() {
try (EntityManager entityManager = appState.getEntityManagerFactory().createEntityManager()) {
try (final Timer.Context timerRefreshCurrentBeneficiaries =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a filter to prevent these metrics from being published to CloudWatch if we don't need to create alarms off of them so we don't incur the additional costs. We can see this data in New Relic instead (unit here is nanoseconds so the value here is 0.28 seconds)
image

@aschey-forpeople aschey-forpeople marked this pull request as draft August 16, 2024 15:51
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.

3 participants