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

HDF5: use native mtime, ctime/btime for created_at, updated_at #50

Open
gicmo opened this issue Feb 5, 2014 · 4 comments
Open

HDF5: use native mtime, ctime/btime for created_at, updated_at #50

gicmo opened this issue Feb 5, 2014 · 4 comments
Assignees
Milestone

Comments

@gicmo
Copy link
Member

gicmo commented Feb 5, 2014

We currently use HDF5 attributes for staring created_at and updated_at. HDF5 already provides a mechanism for recording such information automatically via H5Oget_info[1]. That times will be tracked must be ensured via the corresponding property set by H5Pset_obj_track_times.

[1] http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo
[2] http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetObjTrackTimes

@ghost ghost assigned gicmo Feb 5, 2014
@stoewer
Copy link
Collaborator

stoewer commented Feb 6, 2014

This would help allot, since currently setUpdatedAt() is not invoked in some places and therefor update times are sometimes wrong.
There is only one problem: If we want to preserve the creation time, when one entity is copied from one fine to another, we must find a way to overwrite the ctime inside the hdf5 file.

@balint42
Copy link
Contributor

not sure if I understand the issue: why & when to copy an entity from one file to another?

@gicmo
Copy link
Member Author

gicmo commented Mar 4, 2014

I had a look into[1] this and it is quite disappointing. Apparently support for everything but ctime for datasets is lacking:

% ./playground                                                               [master|◯]
--- group
atime: 0 Thu Jan  1 01:00:00 1970
mtime: 0 Thu Jan  1 01:00:00 1970
ctime: 0 Thu Jan  1 01:00:00 1970
btime: 0 Thu Jan  1 01:00:00 1970
---
--- dataset
atime: 0 Thu Jan  1 01:00:00 1970
mtime: 0 Thu Jan  1 01:00:00 1970
ctime: 1393954764 Tue Mar  4 18:39:24 2014
btime: 0 Thu Jan  1 01:00:00 1970
---
--- file
atime: 0 Thu Jan  1 01:00:00 1970
mtime: 0 Thu Jan  1 01:00:00 1970
ctime: 0 Thu Jan  1 01:00:00 1970
btime: 0 Thu Jan  1 01:00:00 1970
---

See also this conversation from June, 2012: [2]

This is basically a showstopper for this bug -> not a target for Milestone First Alpha.

[1] Compete hack as a test: https://gist.github.com/gicmo/9351530
[2] http://permalink.gmane.org/gmane.comp.programming.hdf/3580

@gicmo gicmo removed this from the First Alpha milestone Mar 4, 2014
@jgrewe
Copy link
Member

jgrewe commented Mar 4, 2014

Indeed a bit disappointing and I would not like to implement created_at in a different way than the updated_at time-stamp...

@stoewer stoewer closed this as completed Mar 6, 2014
@stoewer stoewer added this to the Second Alpha milestone Mar 6, 2014
@stoewer stoewer reopened this Mar 6, 2014
@jgrewe jgrewe modified the milestones: future, Second Alpha Mar 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants