-
Notifications
You must be signed in to change notification settings - Fork 74
[#709] preserve options in chaining obj.metadata(opt1=val1)(opt2=val2) #716
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
base: main
Are you sure you want to change the base?
Conversation
korydraughn
left a comment
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.
Looks good overall.
…val2) In other words, setting opt2 = val2 does not reset opt1 back to its default value. [_709] correct and streamline. _opts and __kw should be separate. [_709] reasonable copy of _opts
ef597fa to
087ded2
Compare
|
Evidently it is still possible to fail here: The modify time turned out on this occasion to be one second later than the access time on a just-created replica open for write: @korydraughn any ideas why this might occasionally happen? |
|
Squashed , ready for review. |
alanking
left a comment
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.
I am especially interested in the changes related to #768 given the milestone for that issue.
Hmm, I don't think the python test code is equivalent to the following C++ test code? The C++ test code I linked to expects the replica to be in the intermediate state. I think the problem with the python test is that the following call closes the data object, resulting in the close operation updating the mtime. python-irodsclient/irods/test/data_obj_test.py Line 3311 in 94b8594
What you need to do is open (and create) a new replica and do your checks while the replica is open. Closing the replica is what causes the atime and mtime to desync. |
Ah, you're right. I see. Will try it a different way. |
|
What's the status of this PR? |
Looks like we are good. Need a squash, and perhaps a codacy review. |
korydraughn
left a comment
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.
Looks good overall.
Just a few comments on the README.
| increase code efficiency if for example a lot of AVUs must be added or deleted | ||
| at once without reading any back again. | ||
|
|
||
| ``` |
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.
| ``` | |
| ```py |
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.
Looks like this was missed.
[_768] add test [_768] reasonable handling of _meta reload test altered for clarity
Example: iRODSBinOrStringMeta allows storing arbitrary octet strings in metadata.
We test a still open replica at its point of creation, asserting mod and access times are equal. And we clean up after ourselves now.
Co-authored-by: Kory Draughn <korydraughn@ymail.com>
In other words, setting opt2 = val2 does not reset opt1 back to its default value.