-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor upserts for instance ip addresses
Enable the use of SELECT FOR UPDATE when finding existing instance ip address rows that may be changed during an upsert transaction. This will lock the rows, even from reads, until the transaction is commit. Based on the combination of this and the previous commit where we enforce ip address uniqueness in the db, we should have good protection from upsert race conditions. Also refactor the retry logic into its own wrapper function for improved clarity.
- Loading branch information
1 parent
a58c2f3
commit aca8032
Showing
2 changed files
with
73 additions
and
84 deletions.
There are no files selected for viewing
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
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