Skip to content

VED-714 (Addition) - Add info log and fix rare race condition#839

Merged
dlzhry2nhs merged 1 commit intomasterfrom
feature/VED-714-add-logs-and-fix-minor-issue-on-new-arch
Sep 22, 2025
Merged

VED-714 (Addition) - Add info log and fix rare race condition#839
dlzhry2nhs merged 1 commit intomasterfrom
feature/VED-714-add-logs-and-fix-minor-issue-on-new-arch

Conversation

@dlzhry2nhs
Copy link
Collaborator

@dlzhry2nhs dlzhry2nhs commented Sep 22, 2025

Summary

  • Routine Change

Spotted an issue in the non-prod alerting channel. Have undertaken a couple of changes to make supporting the new Lambda a bit easier in future.

  1. Add an info log at the start of the invocation with the filename and the message ID for traceability.
  2. Ensure the audit table entry is saved before sending to SQS.

It is hard to replicate the issue as it is intermittent and requires a fair bit of traffic. However, I have seen circumstances where this happens when we have a lot of Medicus messages coming in at once.

Essentially if the batch filter Lambda is running hot, it could be that the filename proc lambda sends a message to SQS and this is picked up before it actually writes the batch table entry. As DDB is eventually consistent, this means that it might fail to retrieve the entry.

I therefore made a minor change to ensure it is created before sending to SQS.

Reviews Required

  • Dev

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • I have ensured the changelog has been updated by the submitter, if necessary.

@github-actions
Copy link
Contributor

This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket:

VED-714

@sonarqubecloud
Copy link

@dlzhry2nhs dlzhry2nhs marked this pull request as ready for review September 22, 2025 10:31
@dlzhry2nhs dlzhry2nhs enabled auto-merge (squash) September 22, 2025 10:35
@dlzhry2nhs dlzhry2nhs merged commit 551ac8b into master Sep 22, 2025
8 checks passed
@dlzhry2nhs dlzhry2nhs deleted the feature/VED-714-add-logs-and-fix-minor-issue-on-new-arch branch September 22, 2025 10:49
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