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

Validate operations on FileHandles #1113

Merged
merged 4 commits into from
Nov 13, 2024
Merged

Conversation

blt
Copy link
Collaborator

@blt blt commented Nov 12, 2024

What does this PR do?

This commit allows State to track whether a file handle is valid for read etc
operations. Our GC mechanism keeps track of the open-handles but assumes the
correctness of callers, meaning if multiple calls to release are made at the
filesystem level a node may be GC'ed before its time.

The State now keeps a record of which FileHandles exist and whether they remain
valid, meaning the GC mechanism cannot be misled.

Motivation

SMPTNG-531

This commit allows State to track whether a file handle is valid for read etc
operations. Our GC mechanism keeps track of the open-handles but assumes the
correctness of callers, meaning if multiple calls to `release` are made at the
filesystem level a node may be GC'ed before its time.

The State now keeps a record of which FileHandles exist and whether they remain
valid, meaning the GC mechanism cannot be misled.

REF SMPTNG-532

Signed-off-by: Brian L. Troutwine <[email protected]>
Copy link
Collaborator Author

blt commented Nov 12, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @blt and the rest of your teammates on Graphite Graphite

@blt blt added the no-changelog label Nov 12, 2024 — with Graphite App
@blt blt marked this pull request as ready for review November 12, 2024 19:03
@blt blt requested a review from a team as a code owner November 12, 2024 19:03
Signed-off-by: Brian L. Troutwine <[email protected]>
Signed-off-by: Brian L. Troutwine <[email protected]>
Comment on lines 1290 to 1292
!valid_handles.is_empty(),
"Unlinked, read-only file with open handles should have valid file handles"
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: indentation is off here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So it is and cargo-fmt didn't catch it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Macros :( There was a google summer of code project that I think will improve this in the next few releases.

Signed-off-by: Brian L. Troutwine <[email protected]>
@blt blt merged commit 816c8d3 into main Nov 13, 2024
18 checks passed
@blt blt deleted the blt/validate_operations_on_filehandles branch November 13, 2024 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants