-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-10946. Test combinations of rename and rewrite #6823
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
Merged
adoroszlai
merged 2 commits into
apache:HDDS-10656-atomic-key-overwrite
from
adoroszlai:HDDS-10946
Jun 21, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should have a different timestamp for modification? Right now the the rewrite of Key seems to update the modification time which could imply the actual contents of the objects have change not just the layout.
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.
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.
If I understand the concern correctly, I think it is reasonable to change the modification time also in the case when just the metadata is changing, in my opinion the metadata and the data together represents a key, and during a rename the key is changing.
On the other hand it is a good question whether it is useful to have the last modification time of the contents of the key in a separate timestamp... or which timestamp is more useful if we don't want to keep two separate timestamp for this.
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.
Changing a customer facing attribute that is supposed to indicate modifications initiated by the customer when the customer does not interact with the object is not normal. We should add a separate timestamp for this.
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.
Applications can use mod time to invalidate content cache which would be incorrectly triggered due to tiering in this case. cc @sodonnel @szetszwo
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.
mtime should be updated only if the file content is changed, i.e. mv, chmod, etc should not update time.
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.
But they already do, and changing that behavior is out of scope for both this PR and this feature branch.
Uh oh!
There was an error while loading. Please reload this page.
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.
This Ozone feature is being added to facilitate a use case we have around data tiering, but that is not its only use case. It is completely valid for a user to use the atomic rewrite API to change the contents of a key and not its replication type. At the OM side, where the meta data is stored, it doesn't know anything about the content size, so OM isn't easily able to make that distinction.
So in the general case, the use of the rewrite API is user initiated and hence mtime updates could be expected.
If mtime is already changed by mv, chmod etc, then addressing this seems to be a wider Ozone issue that should be taken up by a separate initiative. The atomic API would be better keeping with the existing patterns, otherwise its behavior would be out of place compared to the existing system behavior.
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 agree, we should discuss mtime behaviour or any changes to it somewhere separately if possible. This PR only adds tests to the current behaviour and does not change the behaviour itself in any way.