[ 
https://issues.apache.org/jira/browse/HDDS-17606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18138514#comment-18138514
 ] 

Gargi Jaiswal edited comment on HDDS-17606 at 11/5/26, 7:09 AM:
----------------------------------------------------------------

This is not a bug.

*Analysis Why EC read is happening with short-circuit?*
EC container reads go through short-circuit because each EC cell is read as a 
one-node {{STAND_ALONE}} pipeline, not as an EC pipeline.
{{ECBlockInputStream}} builds that pipeline and sets the replica index to 1 or 
higher. The short-circuit check in {{XceiverClientManager}} only skips a 
pipeline when its type is {{{}EC{}}}, so this {{STAND_ALONE}} pipeline passes 
the check. When the client is on the same host as that datanode, it opens the 
domain socket and the datanode grants the local block file. That is why 
{{numLocalGetBlock}} and {{localBytesGetBlock}} increases and scr read happens.

_It’s not an intention to not allow EC to use short-circuit read, just HBase 
doesn’t use EC, so we never test the EC with short-circuit._

*Action Required:*
Analysing whether there will be any harm if EC key reads happen through 
Short-circuit. If no major problem seen we can allow let the EC read also 
happen through SCR else will have to exclude EC for short-circuit.


was (Author: JIRAUSER308350):
*Analysis Why EC read is happening with short-circuit?*
EC container reads go through short-circuit because each EC cell is read as a 
one-node {{STAND_ALONE}} pipeline, not as an EC pipeline.
{{ECBlockInputStream}} builds that pipeline and sets the replica index to 1 or 
higher. The short-circuit check in {{XceiverClientManager}} only skips a 
pipeline when its type is {{{}EC{}}}, so this {{STAND_ALONE}} pipeline passes 
the check. When the client is on the same host as that datanode, it opens the 
domain socket and the datanode grants the local block file. That is why 
{{numLocalGetBlock}} and {{localBytesGetBlock}} increases and scr read happens.

_It’s not an intention to not allow EC to use short-circuit read, just HBase 
doesn’t use EC, so we never test the EC with short-circuit._

*Action Required:*
Analysing whether there will be any harm if EC key reads happen through 
Short-circuit. If no major problem seen we can allow let the EC read also 
happen through SCR else will have to exclude EC for short-circuit.

> EC key is read by short-circuit on a co-located client
> ------------------------------------------------------
>
>                 Key: HDDS-17606
>                 URL: https://issues.apache.org/jira/browse/HDDS-17606
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Elavarasan Kathirvel
>            Assignee: Gargi Jaiswal
>            Priority: Major
>              Labels: short-circuit-read
>
> Short-circuit read is enabled on the cluster. An EC key is written and then 
> read from a client running on the same host as a datanode.
> An EC key must use the normal read path via gRPC. Short-circuit is for Ratis 
> keys.
> *Steps to Reproduce:*
>  * Enable Short-Circuit Read (SCR) on the client and all DataNodes.
>  ** Run {{ozone debug checknative}} and verify that {{hadoop: true}} is 
> displayed on the client and DataNodes.
>  * Create an EC bucket, for example, {{{}RS-3-2{}}}.
>  * Create a 200 MB key and identify the replica host.
>  * Read the key from the replica host. and check the {{localBytesGetBlock}} 
> metric increases.
>  
> Expected: 
>  * The read succeeds and the data matches.
>  * The client uses the normal read path via gRPC.
>  * {{numLocalGetBlock}} and {{localBytesGetBlock}} stays 0 on every datanode, 
> including the co-located one.
> Actual: 
>  * The read succeeds and the data matches.
>  * {{numLocalGetBlock}} and {{localBytesGetBlock}} increases on the 
> co-located datanode.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to