-
Notifications
You must be signed in to change notification settings - Fork 18
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
Me/dpc 4545 fix aggregation #2485
Open
MEspositoE14s
wants to merge
6
commits into
main
Choose a base branch
from
me/dpc-4545-fix-aggregation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 2be580b Author: Ashley Weaver <[email protected]> Date: Thu Feb 27 13:36:07 2025 -0500 [DPC-4406] Upgrade JDK and Dropwizard (#2368) ## 🎫 Ticket https://jira.cms.gov/browse/DPC-4406 ## 🛠 Changes Upgrades to JDK 17 and Dropwizard 4 ## ℹ️ Context <!-- Why were these changes made? Add background context suitable for a non-technical audience. --> <!-- If any of the following security implications apply, this PR must not be merged without Stephen Walter's approval. Explain in this section and add @SJWalter11 as a reviewer. - Adds a new software dependency or dependencies. - Modifies or invalidates one or more of our security controls. - Stores or transmits data that was not stored or transmitted before. - Requires additional review of security implications for other reasons. --> ## 🧪 Validation Deploy is [passing](https://github.com/CMSgov/dpc-app/actions/runs/13445174778). --------- Co-authored-by: MEspositoE14s <[email protected]>
This reverts commit 84e4dd0.
MEspositoE14s
commented
Feb 28, 2025
@@ -174,7 +174,7 @@ public Optional<JobQueueBatch> claimBatch(UUID aggregatorID) { | |||
@SuppressWarnings("unchecked") | |||
private void restartStuckBatches(Session session) { | |||
// Find stuck batches | |||
List<String> stuckBatchIDs = session.createNativeQuery("SELECT Cast(batch_id as varchar) batch_id FROM job_queue_batch WHERE status = 1 AND update_time < current_timestamp - interval '5 minutes' FOR UPDATE SKIP LOCKED") | |||
List<String> stuckBatchIDs = session.createNativeQuery("SELECT Cast(batch_id as varchar) batch_id FROM job_queue_batch WHERE status = 1 AND update_time < current_timestamp - interval '15 minutes' FOR UPDATE SKIP LOCKED") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have DPC-4548 to figure out what time this should be set to, but I bumped it up in the meantime to prevent jobs from getting stuck until that ticket gets completed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
https://jira.cms.gov/browse/DPC-4545
🛠 Changes
completePartialBatch
so that it updates the job_queue_batch table after each patient is processed.ℹ️ Context
We noticed that jobs were getting stuck in the queue because the update_time in the job_queue_batch table wasn't getting set frequently enough. Sometimes it's because of issues in our DB code and sometimes it's because patients are taking a long time to process. This should clean up both of those.
🧪 Validation
I verified that the code does what I expected it to, but the only way to know for sure if this fixes our problem is to deploy it to prod and periodically check the logs to see if jobs are still getting stuck.