You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2024/06/17 12:53:15 UTC
[PR] HDDS-10946. Test combinations of rename and rewrite [ozone]
adoroszlai opened a new pull request, #6823:
URL: https://github.com/apache/ozone/pull/6823
## What changes were proposed in this pull request?
Add some tests that rename a key in both OBS and FSO buckets to sure the atomic commit works fine with renames.
https://issues.apache.org/jira/browse/HDDS-10946
## How was this patch tested?
https://github.com/adoroszlai/ozone/actions/runs/9546938396/job/26311575455#step:5:2174
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10946. Test combinations of rename and rewrite [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #6823:
URL: https://github.com/apache/ozone/pull/6823#discussion_r1644067080
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java:
##########
@@ -1133,6 +1133,43 @@ void overwriteAfterRewrite(BucketLayout layout) throws IOException {
assertEquals(overwriteDetails.getGeneration(), actualKeyDetails.getGeneration());
}
+ @ParameterizedTest
+ @EnumSource
+ void rewriteAfterRename(BucketLayout layout) throws IOException {
+ OzoneBucket bucket = createBucket(layout);
+ OzoneKeyDetails keyDetails = createTestKey(bucket);
+ String newKeyName = "rewriteAfterRename-" + layout;
+
+ bucket.renameKey(keyDetails.getName(), newKeyName);
+ OzoneKeyDetails renamedKeyDetails = bucket.getKey(newKeyName);
+ OmKeyArgs keyArgs = toOmKeyArgs(renamedKeyDetails);
+ OmKeyInfo keyInfo = ozoneManager.lookupKey(keyArgs);
+
+ final byte[] rewriteContent = "rewrite".getBytes(UTF_8);
+ rewriteKey(bucket, renamedKeyDetails, rewriteContent);
+
+ OzoneKeyDetails actualKeyDetails = assertKeyContent(bucket, newKeyName, rewriteContent);
+ assertMetadataUnchanged(keyDetails, actualKeyDetails);
+ assertMetadataAfterRewrite(keyInfo, ozoneManager.lookupKey(keyArgs));
Review Comment:
- There is no restriction for rewritten content, could be changed from original one.
- Modification time is always updated, even for rename.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10946. Test combinations of rename and rewrite [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #6823:
URL: https://github.com/apache/ozone/pull/6823#issuecomment-2182026994
Thanks @fapifta, @kerneltime, @sodonnel for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10946. Test combinations of rename and rewrite [ozone]
Posted by "kerneltime (via GitHub)" <gi...@apache.org>.
kerneltime commented on code in PR #6823:
URL: https://github.com/apache/ozone/pull/6823#discussion_r1643164358
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java:
##########
@@ -1133,6 +1133,43 @@ void overwriteAfterRewrite(BucketLayout layout) throws IOException {
assertEquals(overwriteDetails.getGeneration(), actualKeyDetails.getGeneration());
}
+ @ParameterizedTest
+ @EnumSource
+ void rewriteAfterRename(BucketLayout layout) throws IOException {
+ OzoneBucket bucket = createBucket(layout);
+ OzoneKeyDetails keyDetails = createTestKey(bucket);
+ String newKeyName = "rewriteAfterRename-" + layout;
+
+ bucket.renameKey(keyDetails.getName(), newKeyName);
+ OzoneKeyDetails renamedKeyDetails = bucket.getKey(newKeyName);
+ OmKeyArgs keyArgs = toOmKeyArgs(renamedKeyDetails);
+ OmKeyInfo keyInfo = ozoneManager.lookupKey(keyArgs);
+
+ final byte[] rewriteContent = "rewrite".getBytes(UTF_8);
+ rewriteKey(bucket, renamedKeyDetails, rewriteContent);
+
+ OzoneKeyDetails actualKeyDetails = assertKeyContent(bucket, newKeyName, rewriteContent);
+ assertMetadataUnchanged(keyDetails, actualKeyDetails);
+ assertMetadataAfterRewrite(keyInfo, ozoneManager.lookupKey(keyArgs));
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10946. Test combinations of rename and rewrite [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #6823:
URL: https://github.com/apache/ozone/pull/6823
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org