jihoonson commented on a change in pull request #7000: Fix for
getSingleObjectSummary, replacing keyCount with objectSummaries().size
URL: https://github.com/apache/incubator-druid/pull/7000#discussion_r253742431
##########
File path:
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentMover.java
##########
@@ -174,7 +174,7 @@ private void selfCheckingMove(
.withPrefix(s3Path)
.withMaxKeys(1)
);
- if (listResult.getKeyCount() == 0) {
+ if (listResult.getObjectSummaries().size() == 0) {
Review comment:
Would you please add a comment about why we use
`getObjectSummaries().size()` instead of `getKeyCount()`? According to the
[documentation](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/ListObjectsV2Result.html#getKeyCount--),
I think `getKeyCount()` is supposed to return the number of keys properly, and
so https://github.com/apache/incubator-druid/issues/6980#issuecomment-460006580
looks a bug of swift to me. The comment would help others to understand better
what can happen here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]