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-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org