[
https://issues.apache.org/jira/browse/HBASE-30332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18108065#comment-18108065
]
Hudson commented on HBASE-30332:
--------------------------------
Results for branch branch-3
[build #608 on
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/608/]:
(/) *{color:green}+1 overall{color}*
----
details (if available):
(/) {color:green}+1 general checks{color}
-- For more information [see general
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/608/General_20Nightly_20Build_20Report/]
(/) {color:green}+1 jdk17 hadoop3 checks{color}
-- For more information [see jdk17
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/608/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
> 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
> Assignee: mazhengxuan
> Priority: Minor
> Labels: pull-request-available
> Fix For: 2.7.0, 3.1.0, 3.0.1, 2.6.8
>
>
> 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)