-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Of all 6 SQL databases:
sandbox_metadata, pilot_agents aren't using foreign keys at all. This could lead to orphan data in the database for two reasons:
- if a pilot is deleted in the
PilotAgentstable, all pilot related data like inJobToPilotMappingwill not be deleted - we could have an unknown
pilot_idinPilotOutputbecause we inserted a non-existent one (so we are obliged to verify that the newpilot_idexists in the database, manually, instead of letting the db verify for us and doing its magic) or because it does not exist anymore (see 1.)
I don't know if this is a choice, or a mistake. If it is a choice, task_queue and job do use foreign keys. And furthermore, even if we check manually, I think it is better to have constraints inside the DB itself, rather than constraints done before.
In the meanwhile, job_logging and auth can't use it, because the client_id is remotely defined in IAM if I recall.
Metadata
Metadata
Assignees
Labels
No labels