Skip to content

[DPL-1341] Fix concurrency bug#2

Merged
alyssaruth merged 3 commits intomainfrom
dpl-1341-concurrency-bug
Oct 1, 2024
Merged

[DPL-1341] Fix concurrency bug#2
alyssaruth merged 3 commits intomainfrom
dpl-1341-concurrency-bug

Conversation

@alyssaruth
Copy link
Copy Markdown
Contributor

Updates the /register endpoint to be thread-safe. A concurrent map write error was responsible for this develop failure: https://patientsknowbest.slack.com/archives/CSSKCC4AY/p1727713848635699

I considered going more "whole hog", but unfortunately Go's SyncMap doesn't support generics yet and implementing our own felt overkill. I think registration is the only time we're hitting test control with concurrent requests anyway.

@alyssaruth alyssaruth requested a review from MFAshby October 1, 2024 12:38
Copy link
Copy Markdown
Contributor

@MFAshby MFAshby left a comment

Choose a reason for hiding this comment

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

LGTM

@alyssaruth alyssaruth merged commit f4fae60 into main Oct 1, 2024
@alyssaruth alyssaruth deleted the dpl-1341-concurrency-bug branch October 1, 2024 12:42
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.

2 participants