ivandika3 commented on code in PR #8558:
URL: https://github.com/apache/ozone/pull/8558#discussion_r2141748460
##########
hadoop-ozone/integration-test-s3/src/test/java/org/apache/hadoop/ozone/s3/awssdk/v2/AbstractS3SDKV2Tests.java:
##########
@@ -621,4 +648,512 @@ private void completeMultipartUpload(String bucketName,
String key, String uploa
assertEquals(bucketName, compResponse.bucket());
assertEquals(key, compResponse.key());
}
+
+ @Nested
+ @TestInstance(TestInstance.Lifecycle.PER_CLASS)
+ class S3BucketVerificationConditionTests {
+
+ private static final String DEFAULT_BUCKET_NAME = "default-bucket";
+ private String correctOwner;
+ private static final String WRONG_OWNER = "wrong-owner";
+ private static final String BUCKET_VERIFICATION_TEST_KEY = "test-key";
+
+ @BeforeAll
+ public void setup() throws Exception {
Review Comment:
Thanks for testing it.
Yes, seems `RpcClient#createBucket` will populate the owner (and other with
the current user (`UserGroupInformation#getShortUserName`) if the owner is not
specified in the `BucketArgs` (e.g. when creating a link bucket or when bucket
creation does not specify owner name).
This might cause some inconsistencies between the link bucket and the source
bucket info (e.g. different owner, different bucket layout). Currently most /
if not all the operations on link bucket should be sent to the source bucket
since both are referring to the same bucket. So technically a link bucket
should only contain enough info to point to the source bucket.
I think for now we can simply follow the current behavior that dangling
bucket can have an owner. In the future, we might need to modify
`getBucketInfo` when handling link bucket.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]