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

Expose H5Pset_obj_track_times object creation property #517

Merged
merged 2 commits into from
Sep 17, 2018
Merged

Expose H5Pset_obj_track_times object creation property #517

merged 2 commits into from
Sep 17, 2018

Conversation

ddemidov
Copy link
Contributor

HDF5 tracks object access/modification times, which in general makes any two files with identical contents differ byte-wise. This PR allows to disable/enable time tracking for datasets. This, for example, may help to reduce disk space when files are stored in a key-value store, where key is derived by hashing the file contents.

To illustrate the idea:

  • With time tracking (the default behavior):
h5open("a.h5", "w") do f
    f["y"] = [1, 2, 3]
end
h5open("b.h5", "w") do f
    f["y"] = [1, 2, 3]
end
md5sum a.h5 b.h5
d85cfc58cce44f08efc7ab360d48016f  a.h5
51c6fa2b556b73911a5e4479853c5ce5  b.h5
  • Without time tracking:
h5open("a.h5", "w") do f
    f["y", "track_times", false] = [1, 2, 3]
end
h5open("b.h5", "w") do f
    f["y", "track_times", false] = [1, 2, 3]
end
9e1b6badd6152d65871dc4dc8bfb2dd1  a.h5
9e1b6badd6152d65871dc4dc8bfb2dd1  b.h5

Allow to disable/enable access time tracking for datasets,
so that the file with identical data is always the same, byte-to-byte.
@musm
Copy link
Member

musm commented Sep 13, 2018

add tests?

@ddemidov
Copy link
Contributor Author

Done

@musm musm merged commit 343b1ab into JuliaIO:master Sep 17, 2018
@ddemidov ddemidov deleted the track-times branch September 17, 2018 06:24
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

2 participants