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 Flux KVS "ver" field to help determine when to transfer files #46

Open
ilumsden opened this issue Sep 15, 2023 · 2 comments
Open

Use Flux KVS "ver" field to help determine when to transfer files #46

ilumsden opened this issue Sep 15, 2023 · 2 comments

Comments

@ilumsden
Copy link
Collaborator

The Flux KVS keeps track of the "version" of its entries through a "ver" field. We should use this to help determine if a file has changed. If the version of the KVS entry changes, we transfer. Otherwise, we don't.

@ilumsden
Copy link
Collaborator Author

Alternatively, we could do the following:

  1. Append/prepend the version number to the file name
  2. Transfer data and save under new file name
  3. Cache file name and version number for future lookup
  4. Return handle to file w/ new name

@chu11
Copy link
Member

chu11 commented Sep 15, 2023

The Flux KVS keeps track of the "version" of its entries through a "ver" field. We should use this to help determine if a file has changed. If the version of the KVS entry changes, we transfer. Otherwise, we don't.

Just an FYI, ver in KVS entries probably isn't what you think it is. It's the version of the tree object format that data is stored in. You can see it doesn't get updated in this example ...

>flux kvs put foo=1
>flux kvs get --treeobj foo
{"data":"MQ==","type":"val","ver":1}
>flux kvs put foo=blarg
>flux kvs get --treeobj foo
{"data":"Ymxhcmc=","type":"val","ver":1}

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

No branches or pull requests

2 participants