Skip to content

store: update how we model file changes #6503

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

Merged
merged 1 commit into from
Feb 23, 2025
Merged

store: update how we model file changes #6503

merged 1 commit into from
Feb 23, 2025

Conversation

nicks
Copy link
Member

@nicks nicks commented Feb 17, 2025

before this PR, we kept a map of recent file changes,
and deleted from the map when the changes were consumed.

this creates race conditions if the events are processed
in a different order than the changes, e.g.,
if a "consumed" event at 12:02 is processed before
the file change event at 12:01.

after this PR, we record both the file change time
and the consumed time, then compare them to determine
if the file change is still pending.

Signed-off-by: Nick Santos nick.santos@docker.com

@nicks nicks force-pushed the nicks/flake branch 4 times, most recently from 0c690eb to 3a86073 Compare February 20, 2025 04:31
before this PR, we kept a map of recent file changes,
and deleted from the map when the changes were consumed.

this creates race conditions if the events are processed
in a different order than the changes, e.g.,
if a "consumed" event at 12:02 is processed before
the file change event at 12:01.

after this PR, we record both the file change time
and the consumed time, then compare them to determine
if the file change is still pending.

Signed-off-by: Nick Santos <nick.santos@docker.com>
@nicks nicks merged commit 2e7cd3a into master Feb 23, 2025
8 checks passed
@nicks nicks deleted the nicks/flake branch February 23, 2025 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant