Project

General

Profile

Refactor #21639

unique constraints should be enforced in the DB as well

Added by Tomer Brisker over 3 years ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

ActiveRecord unique constraints might not be properly enforced when Foreman is run in multiple processes due to "Time of Check - Time of Use" errors.
All unique constraints should also be enforced by database index constraints which will prevent invalid duplicate entries.


Related issues

Blocked by Foreman - Bug #21766: Duplicate entries in taxable_taxonomies tableClosed2017-11-26
Blocked by Foreman - Bug #21926: Compute-resource image creation allows duplicate nameClosed2017-12-11

History

#1 Updated by Tomer Brisker over 3 years ago

  • Blocked by Bug #21766: Duplicate entries in taxable_taxonomies table added

#2 Updated by Tomer Brisker over 3 years ago

  • Blocked by Bug #21926: Compute-resource image creation allows duplicate name added

#3 Updated by Amit Upadhye 3 months ago

Tomer Brisker wrote:

ActiveRecord unique constraints might not be properly enforced when Foreman is run in multiple processes due to "Time of Check - Time of Use" errors.
All unique constraints should also be enforced by database index constraints which will prevent invalid duplicate entries.

I can see both the subtasks are completed, should we close this tracker?

#4 Updated by Tomer Brisker 3 months ago

  • Status changed from New to Resolved

good point, closing this one.

Also available in: Atom PDF