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

Removes unnecessary select and fixes potential time-of-check, time-of-use problem #6010

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

tempoz
Copy link
Contributor

@tempoz tempoz commented Feb 27, 2024

Rather than first performing a select to determine if we should insert or update, we can attempt an insert which does nothing on conflict and then update if the query executes without error but affects no rows.

Related issues: N/A

@tylerwilliams
Copy link
Member

looks like this needs buildfix run on it or imports added

Base automatically changed from telemetry-toctou to master March 19, 2024 14:46
@tempoz tempoz requested a review from bduffany March 19, 2024 14:52
@tempoz tempoz mentioned this pull request Mar 19, 2024
Copy link
Member

@tylerwilliams tylerwilliams left a comment

Choose a reason for hiding this comment

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

LGTM but please get @bduffany's approval too as this is auth code

@tempoz tempoz merged commit 25153ca into master Mar 22, 2024
17 of 21 checks passed
@tempoz tempoz deleted the authdb-toctou branch March 22, 2024 16:40
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.

None yet

3 participants