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

Invalidate last_update_date when source changes #2424

Open
oliverchang opened this issue Jul 30, 2024 · 2 comments
Open

Invalidate last_update_date when source changes #2424

oliverchang opened this issue Jul 30, 2024 · 2 comments
Labels
backlog Important but currently unprioritized enhancement New feature or request infra infrastructure bugs/FRs techdebt Technical debt to be paid down

Comments

@oliverchang
Copy link
Collaborator

Currently, if we change e.g. a bucket or REST endpoint in a SourceRepository and reimport, we may have the following race condition with these checks:

if not ignore_last_import_time and \

if not ignore_last_import_time and (last_modified

This checks whether the candidate record was updated since the last SourceRepository update as an optimisation.

However, if the bucket/REST URL changes, this is irrelevant, and could lead to missed imports because the new bucket/REST URL could've been populated before the last SourceRepository import with the old source.

@oliverchang oliverchang added enhancement New feature or request infra infrastructure bugs/FRs labels Jul 30, 2024
Copy link

This issue has not had any activity for 60 days and will be automatically closed in two weeks

See https://github.com/google/osv.dev/blob/master/CONTRIBUTING.md for how to contribute a PR if you're interested in helping out.

@github-actions github-actions bot added the stale The issue or PR is stale and pending automated closure label Sep 28, 2024
@oliverchang oliverchang added backlog Important but currently unprioritized techdebt Technical debt to be paid down and removed stale The issue or PR is stale and pending automated closure labels Sep 29, 2024
@andrewpollock
Copy link
Contributor

To confirm my understanding of the problem:

for a given source "foo", initially configured to use GCS bucket or REST URL "bar", the potential race condition is when "foo" is reconfigured to use "baz" instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Important but currently unprioritized enhancement New feature or request infra infrastructure bugs/FRs techdebt Technical debt to be paid down
Projects
None yet
Development

No branches or pull requests

2 participants