HDDS-14847. [STS] Expose ExpiredToken Error#9935
Conversation
|
Thanks @fmorg-git for the patch. Overall, this looks good to me, but I have a few questions. |
hi @Russole - what questions do you have? I didn't see them on the comment. |
| if (ex.getCause() instanceof OMException) { | ||
| final OMException omException = (OMException) ex.getCause(); | ||
| handleOMException(omException, bucketName, prefix); | ||
| } else { |
There was a problem hiding this comment.
The comment for ResultCodes.FILE_NOT_FOUND says "continue and send normal response with 0 keyCount", which makes sense for the outer case (before iteration starts).
However, in the new iterator-side runtime path, FILE_NOT_FOUND will stop the loop and return the current response.
So the semantics seem different. Should iterator-side FILE_NOT_FOUND really be treated the same way?
There was a problem hiding this comment.
good catch - updated
There was a problem hiding this comment.
hi @Russole - I think your comment might have been reversed. Before this PR, the inner loop would have thrown on FILE_NOT_FOUND but my initial commit would have swallowed it. So I excluded the FILE_NOT_FOUND case so it will behave the same as before and still handle the AccessDenied and ExpiredToken cases.
|
Hi @fmorg-git , I've submitted my pending review comments. |
Please describe your PR in detail:
BucketEndpoint, if an acl check gave PermissionDenied, a RuntimeException inOzoneBucket$KeyIterator.hasNext()which was not caught and bubbled up to the end user as an Internal Server Error http code 500. So a commit is made here to catch the RuntimeException and if it is of type OMException, then handle it the same way the code that handles expired token does.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14847
How was this patch tested?
manual test waiting for expiration, unit tests