Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

Date

Authors

Reuben Roberts

Status

Documenting

Summary

Some TISSS trainee profiles have incomplete Programme Membership data

Impact

TISSS trainee profile data missing for some trainees

Non-technical Description

Trainee profile data is copied into TIS Self-Service from TIS. This happens whenever data is added or updated in TIS. Our monitoring tool alerted us that some TIS programme membership data was repeatedly failing to be loaded successfully into TIS Self-Service. The issue arose on 28 Dec 2022, and was resolved on 12 Jan 2023.


Trigger

  • It is possible that the ID’s of some CurriculumMembership records had changed. We use the ID’s as a primary key. Database writes were compromised by excess optimistic locking errors.


Detection

  • CloudWatch Alarm in the #monitoring Slack channel for messages in the tis-trainee-sync-prod-dlq (Since 2022-12-28 10:23:34)


Resolution

  • 11:25 - Alerted users on TIS Self-Service Teams channel that we would be doing maintenance, and proceeded with the following:
    Clear-down the curriculumMembership table in the sync database
    Clear-down the tis-trainee-sync-prod-dlq
    Reload the TCS CurriculumMembership data in the DMS

  • 11:20 Reworked mongoDB cluster deployed for tis-trainee-sync (prod)

  • 12:27 Reworked mongoDB cluster deployed for tis-trainee-details (prod)


Timeline

All times in GMT unless indicated

  • : 09:00 - First CloudWatch Alarm in the #monitoring Slack channel for messages in the tis-trainee-sync-prod-dlq

  • : 12:44 - Investigation into the messages on the DLQ

  • 11:25 - Alerted users on TIS Self-Service Teams channel that we would be doing maintenance, and proceeded with the following:
    Clear-down the curriculumMembership table in the sync database
    Clear-down the tis-trainee-sync-prod-dlq
    Reload the TCS CurriculumMembership data in the DMS

  • 11:00 (approx) Redrive all messages in DQL

  • 11:20 Reworked mongoDB cluster deployed for tis-trainee-sync (prod)

  • 12:27 Reworked mongoDB cluster deployed for tis-trainee-details (prod)

  • 16:30 No messages have arrived in tis-trainee-sync-prod-dlq

Root Cause(s)

  • Valid Curriculum Membership records were unexpectedly accumulating in the tis-trainee-sync-prod-dlq, and traineeProfile records were not being updated

  • tis-trainee-details was throwing lots of optimistic record locking exceptions for these updates, which was causing the tis-trainee-sync message processing to fail

  • Our hypothesis is that changes to the Mongo DB cluster in early December 2022 are implicated in this, since no other obvious changes to infrastructure or processing have been made recently

    • The use of cluster replicas for record reads may have increased our processing speed in tis-trainee-sync. Since the changes are pushed to tis-trainee-details using REST requests, there is no throttling of this, resulting in a much higher collision rate as the same records are updated almost simultaneously by different instances of tis-trainee-details.

    • The use of cluster replicas for record reads may retrieve stale data if the same record is written and read in short order (10-20ms, before eventual consistency). This could result in excess optimistic locking failures if a stale trainee profile is retrieved from a cluster replica (assuming an update to that profile document has been made on the master node, but the changes has not yet been distributed to the other nodes). Any update to a document thus retrieved will always fail, since it was not the latest version when it was first retrieved.


Action Items

Action Items

Owner

Clear and resync curriculumMembership data (NO-TICKET)

Reuben Roberts

DONE

TIS21-4064 - Getting issue details... STATUS

John Simmons (Deactivated)

DONE

TIS21-4076 - Getting issue details... STATUS

Reuben Roberts

TICKETED


Lessons Learned

  • We need to investigate Production DLQ messages more promptly, since they indicate data issues that will affect PGDiTs

  • No labels