smengcl commented on code in PR #4448:
URL: https://github.com/apache/ozone/pull/4448#discussion_r1157848318
##########
hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot:
##########
@@ -151,14 +151,34 @@ Incorrect values for end and start offset
Should Be Equal ${expectedData}
${actualData}
Zero byte file
- ${result} = Execute AWSS3APICli and checkrc
get-object --bucket ${BUCKET} --key ${PREFIX}/putobject/key=value/zerobyte
--range bytes=0-0 /tmp/testfile2.result 255
- Should contain ${result}
InvalidRange
-
- ${result} = Execute AWSS3APICli and checkrc
get-object --bucket ${BUCKET} --key ${PREFIX}/putobject/key=value/zerobyte
--range bytes=0-1 /tmp/testfile2.result 255
- Should contain ${result}
InvalidRange
-
- ${result} = Execute AWSS3APICli and checkrc
get-object --bucket ${BUCKET} --key ${PREFIX}/putobject/key=value/zerobyte
--range bytes=0-10000 /tmp/testfile2.result 255
- Should contain ${result}
InvalidRange
+ ${result} = Execute
ozone sh bucket info /s3v/${BUCKET}
+ ${linked} = Execute
echo '${result}' | jq -j '.sourceVolume,"/",.sourceBucket'
+ ${eval} = Evaluate
"source" in """${linked}"""
+ IF ${eval} == ${True}
+ ${result} = Execute
ozone sh bucket info ${linked}
+ END
+ ${fsolayout} = Evaluate
"OPTIMIZED" in """${result}"""
+
+ ${result} = Execute AWSS3APICli and checkrc get-object
--bucket ${BUCKET} --key ${PREFIX}/putobject/key=value/zerobyte --range
bytes=0-0 /tmp/testfile2.result 255
+ IF ${fsolayout} == ${True}
+ Should contain ${result}
NoSuchKey
+ ELSE
+ Should contain ${result}
InvalidRange
+ END
Review Comment:
@SaketaChalamchala and I just had a brief offline discussion. We think it is
strange to return `NoSuchKey` for FSO bucket in this case. The intended
behavior should be the same as OBS or LEGACY bucket that returns `InvalidRange`.
Any idea why this is the case currently? Is it feasible to fix this?
--
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]