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

Use UUIDs for filesystem monitoring radio message identifiers #2631

Merged
merged 2 commits into from Mar 22, 2023

Conversation

benclifford
Copy link
Collaborator

The previous identifier system did not guarantee sufficient uniqueness: specifically, the use of id() to get an object identifier within a process does not return distinct values for distinct objects if those objects have non-overlapping lifetimes.

This lack of uniqueness is not a problem in main current use of the filesystem radio, in Work Queue, where each task also runs inside a new proces, so os.getpid() was also providing additional uniqueness; but in under-development work to use Work Queue coprocesses, that is no longer the case.

Rather than make further effort to generate unique IDs by adding more filename components, this PR uses the uuid library.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

The previous identifier system did not guarantee sufficient uniqueness:
specifically, the use of id() to get an object identifier within a
process does not return distinct values for distinct objects if those
objects have non-overlapping lifetimes.

This lack of uniqueness is not a problem in main current use of the
filesystem radio, in Work Queue, where each task also runs inside a
new proces, so os.getpid() was also providing additional uniqueness;
but in under-development work to use Work Queue coprocesses, that
is no longer the case.

Rather than make further effort to generate unique IDs by adding more
filename components, this PR uses the uuid library.
@benclifford benclifford merged commit 0e9f573 into master Mar 22, 2023
4 checks passed
@benclifford benclifford deleted the benc-monitoring-radio-uuid branch March 22, 2023 09:23
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.

None yet

1 participant