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

store: ensure lockfile is updated before writes #1603

Merged
merged 1 commit into from
May 19, 2023

Conversation

giuseppe
Copy link
Member

The lockfile's write record is now updated prior to the actual write operation. This ensures that, in the event of an unexpected termination, other processes are correctly notified of an initiated write operation.

@giuseppe
Copy link
Member Author

@mtrmac PTAL

@rhatdan
Copy link
Member

rhatdan commented May 18, 2023

@nalind PTAL

@giuseppe giuseppe force-pushed the update-lock-before-write branch from eb2a3eb to 89ddbb8 Compare May 18, 2023 10:46
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Code LGTM, but please add a comment in each instance, so that this is not inadvertently reverted.

The lockfile's write record is now updated prior to the actual write
operation.  This ensures that, in the event of an unexpected
termination, other processes are correctly notified of an initiated
write operation.

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe
Copy link
Member Author

Good catch!

Code LGTM, but please add a comment in each instance, so that this is not inadvertently reverted.

added the comment

@giuseppe giuseppe force-pushed the update-lock-before-write branch from 89ddbb8 to ed76ab9 Compare May 18, 2023 21:44
@giuseppe giuseppe changed the title [RFC] store: ensure lockfile is updated before writes store: ensure lockfile is updated before writes May 18, 2023
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@rhatdan
Copy link
Member

rhatdan commented May 19, 2023

LGTM

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.

3 participants