-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
remove old attribute before inserting renamed attribute #1389
Conversation
@byrnHDF Would you mind approving the workflow? I just want to see if and how things fail here. At least we would have some traceback to better understand what might be the cause. Thanks. |
I've added a fix which solves the renaming/delete issue. At least it works locally on my machine. Please consider approving the workflow. |
(I think HDF group are in Illinois, so it will probably be a few more hours before they're online to approve the Github workflow ;-) |
Thanks @takluyver, I'll wait patiently now. 😁 |
Thanks for letting the workflow run. I've fixed the linter errors (hopefully). Should now be ready another try and for review. Please let me know, if and what I can do to finalize this. Thanks! |
We need to check what the library behavior should be when creation order of attributes is tracked and then an attribute is deleted. There may be a deeper issue here and the change like this may affect netCDF-4 apps. Stay tuned. |
@epourmal No worries, I'm interested to solve this in the best possible way. Actually I'm maintaining And even if my proposed fix is not the correct tool, we might find the correct one in the process. |
The suggested fix to swap the order of processing in H5A__dense_rename() to: I think we need to keep the existing order of processing (insert first then delete), see comments for H5O__attr_link() which is called between the above two routines: The actual problem for not able to delete a renamed attribute is because: Need to work up a better fix. |
Sorry I closed the PR by accident. For the question: "Why is removing/inserting from/in dense storage needed anyway? Wouldn't just updating the indexes with the new name be sufficient? " |
@vchoi-hdfgroup Thanks for the details and suggestions. So would it be possible to not use My C skills are quite rusty. I can try to come up with a solution, but if anyone from inside hdf5 group immediately sees a solution, I'd very much appreciate overriding my PR. This quite aged bug should be resolved soonish. |
We will not have anyone right now to work on the issue. Please, go ahead and try implement what was suggested and submit new PR; mark it with "work in progress" (WIP) and we will be continue working with you. Don't worry about your C skills :-) |
I'm sorry, but I'll not have time and energy to work on this PR. I've updated my issue #1388 with more details and would appreciate if this could be solved by HDF5. Thanks for the support! |
Proof of #1388
Update: added possible fix.
This changes the order of processing. The old attribute is removed from dense storage before the renamed attribute is inserted. With the former behavior, deleting a renamed attribute wasn't possible any more.
Questions:
Why is removing/inserting from/in dense storage needed anyway? Wouldn't just updating the indexes with the new name be sufficient? I'm sure I'm missing background information on the hdf5 internals, so any pointers are welcome.