hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anu Engineer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12238) Ozone: Add valid trace ID check in sendCommandAsync
Date Wed, 09 Aug 2017 18:27:00 GMT

    [ https://issues.apache.org/jira/browse/HDFS-12238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16120410#comment-16120410

Anu Engineer commented on HDFS-12238:

Thanks [~vagarychen] for the comments.

bq. java.lang.IllegalStateException: Duplicate trace ID.
This happens due to 2 conditions.
# Someone is reusing the traceID and calling into the sendCommand.
# A retry operation of the command which is not completed is being attempted. 
I would guess it is the first case, so it is something that should be fixed in TestCBlocReadWrite.
[~msingh] has a JIRA and probably a patch for that.

bq. java.lang.IllegalArgumentException: Invalid trace ID
This is due to the change the [~ajayydv] did, that is something that we should look closer.

bq. , if it finds out request ID is missing, set a random one instead of throwing exception...
I don't think we should do it. If we expect the user app to behave in a certain way, it should
behave in a certain way. We should fix the user app rather than work around in the library.
Also we have tests that try to send in invalid id and expect an exception, then they will
start failing.

> Ozone: Add valid trace ID check in sendCommandAsync
> ---------------------------------------------------
>                 Key: HDFS-12238
>                 URL: https://issues.apache.org/jira/browse/HDFS-12238
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Anu Engineer
>            Assignee: Ajay Yadav
>              Labels: newbie
>         Attachments: HDFS-12238-HDFS-7240.01.patch
> In the function {{XceiverClientHandler#sendCommandAsync}} we should add a check 
> {code}
>    if(StringUtils.isEmpty(request.getTraceID())) {
>       throw new IllegalArgumentException("Invalid trace ID");
>     }
> {code}
> To ensure that ozone clients always send a valid trace ID. However, when you do that
a set of current tests that do add a valid trace ID will fail. So we need to fix these tests
> {code}
>   TestContainerMetrics.testContainerMetrics
>   TestOzoneContainer.testBothGetandPutSmallFile
>   TestOzoneContainer.testCloseContainer
>   TestOzoneContainer.testOzoneContainerViaDataNode
>   TestOzoneContainer.testXcieverClientAsync
>   TestOzoneContainer.testCreateOzoneContainer
>   TestOzoneContainer.testDeleteContainer
>   TestContainerServer.testClientServer
>   TestContainerServer.testClientServerWithContainerDispatcher
>   TestKeys.testPutAndGetKeyWithDnRestart
> {code}
> This is based on a comment from [~vagarychen] in HDFS-11580.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message