[ 
https://issues.apache.org/jira/browse/HBASE-30332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charles Connell reassigned HBASE-30332:
---------------------------------------

    Assignee:     (was: Charles Connell)

> ProtobufUtil.toResult() silently discards QueryMetrics for empty 
> (row-not-found) results
> ----------------------------------------------------------------------------------------
>
>                 Key: HBASE-30332
>                 URL: https://issues.apache.org/jira/browse/HBASE-30332
>             Project: HBase
>          Issue Type: Bug
>          Components: Client, IPC/RPC
>            Reporter: Abinayaa Tharmmarajhan
>            Priority: Minor
>
> When a {{Get}} is issued with {{setQueryMetricsEnabled(true)}} and the 
> requested row does not exist, the {{{}QueryMetrics{}}}(specifically 
> {{{}blockBytesScanned{}}}) are silently dropped during protobuf 
> serialization. The client always receives {{result.getMetrics() == null}} for 
> missing rows, even though the server did read blocks (bloom filters, index 
> blocks) to determine the row is absent and correctly computed the byte count.
>  
> *Steps to Reproduce*
>  # Issue a {{Get}} against a row that does not exist, with 
> {{get.setQueryMetricsEnabled(true)}}
>  # Check {{result.getMetrics()}} on the returned {{Result}}
>  # Observe {{null}} despite blocks having been read server-side
>  
> *Expected Behavior*
> {{result.getMetrics().getBlockBytesScanned()}} returns the number of bytes 
> read to determine the row is absent — the same as it would for a row that 
> exists.
>  
> *Root cause*
> Based on some analysis, in {{ProtobufUtil.toResult(Result result, boolean 
> encodeTags)}} and {{{}ProtobufUtil.toResultNoData(Result result){}}}, when a 
> result has no cells, the code takes an early-return path that returns one of 
> six pre-built static proto constants. This could be causing the QueryMetrics 
> to be dropped for such cases. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to