Page MenuHomePhabricator

Add expiry to db schema
Closed, ResolvedPublic3 Estimated Story Points

Description

As part of improvements to over time data updates, security-api will be expected to expire stale data. To do so, at minimum, the actor_data table will need an expiry column. Please update schema.sql to reflect this. As part of due diligence, please look over the other tables to see if they also need an expiry data. Afaik, they shouldn't since they refer to properties derived from the actor traits and can exist independently of the actor but please confirm.

Related Objects

Event Timeline

Niharika set the point value for this task to 3.Dec 20 2022, 5:41 PM

Change 917812 had a related patch set uploaded (by STran; author: STran):

[wikimedia/security/security-api@master] Add data expiry

https://gerrit.wikimedia.org/r/917812

Change 917812 merged by jenkins-bot:

[wikimedia/security/security-api@master] Add data expiry

https://gerrit.wikimedia.org/r/917812

Tchanders subscribed.

As part of due diligence, please look over the other tables to see if they also need an expiry data. Afaik, they shouldn't since they refer to properties derived from the actor traits and can exist independently of the actor but please confirm.

@STran Has this part been done?

Change 917945 had a related patch set uploaded (by STran; author: STran):

[wikimedia/security/security-api@master] Prefer insert time over an expiry time

https://gerrit.wikimedia.org/r/917945

Yes. I confirmed we probably don't want to add this update to any of the subtype databases (eg. behaviors, proxies) since those will be shared across actors and any actor_data_* tables can be modified using the actor primary key instead of an expiry.

Change 917945 merged by jenkins-bot:

[wikimedia/security/security-api@master] Prefer insert time over an expiry time

https://gerrit.wikimedia.org/r/917945