-
Notifications
You must be signed in to change notification settings - Fork 507
Sync APIs with S3 specification #1678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Sync APIs with S3 specification #1678
Conversation
7cb505b to
97cdc0a
Compare
a186c07 to
29c4a9b
Compare
shtripat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
anjalshireesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor nit and a clarification.
b8c0c94 to
ef2a2fe
Compare
anjalshireesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| CopyObjectResult result) { | ||
| super(headers, bucket, region, object); | ||
| this.etag = etag; | ||
| this.lastModified = result.lastModified(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result called before null check. so, may be a NPE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
|
||
| protected ObjectConditionalReadArgs(ObjectConditionalReadArgs args, String matchETag) { | ||
| this(args); | ||
| this.matchETag = args.matchETag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignores parameter matchETag. so, Do we need matchETag parameter?
| config = | ||
| new CreateBucketConfiguration( | ||
| locationConstraint, args.locationConfig(), args.bucketConfig()); | ||
| locationConstraint, args.locationConfig(), args.bucketConfig(), args.tags()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small doubt here. Tags are only passed to US_EAST_1. What about other regions? Don't we need to pass it?
|
|
||
| protected ObjectConditionalReadArgs(SourceObject args) { | ||
| super(args); | ||
| this.matchETag = args.matchETag(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, We need to add the same to the constructor of GetObjectArgs.java
| if (algorithms != null) algorithm = algorithms.get(0); | ||
| Map<Checksum.Algorithm, String> checksums = response.checksums(); | ||
| if (checksums != null && !checksums.isEmpty()) { | ||
| algorithm = checksums.keySet().iterator().next(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HashMap does not guarantee iteration order. If object has two or more checksums then,.next() will return unpredictable result. Try using LinkedHashMap or EnumMap.
if the order is not an issue then ignore this comment.
Co-authored-by: Shireesh Anjal <355479+anjalshireesh@users.noreply.github.com> Co-authored-by: Sivanantham Gnanavel <158702293+sivanantham-gnanavel@users.noreply.github.com> Signed-off-by: Bala.FA <bala@minio.io>
bd60a4e to
3273c9f
Compare
No description provided.