-
Notifications
You must be signed in to change notification settings - Fork 58
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
refactor(autonomi): deterministic archive #2599
refactor(autonomi): deterministic archive #2599
Conversation
Hi @b-zee , hope you had a good break. I'm curious about this change as I wondered about it for my website metadata which also has a hashmap and considered making it deterministic with a btreemap. Is it that you don't update the time unless the content changes, that this saves chunks? |
Hey Mark! Thanks for asking, I had a good break, hope you've had a nice time as well!
This takes the metadata from the filesystem. So unless that changes, you'll end up with the same |
The uploaded timestamp caused the archive to change between uploads and thus requiring the archive to be re-uploaded.
Use BTreeMap instead of HashMap so serde serializes deterministically.
988654b
to
f13415e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restore the output balance check during the second client upload
within the memory_check CI test.
To ensure there is no extra cost to be paid during repeated uploads.
This ensures the same bunch of files/directories will yield the same (serialized) archive (assuming the files haven't changed). Furthermore, this will mean that uploading the same files will not require uploading a new version of the archive (which would differ slightly from the old).