Sigma-Ma opened a new pull request, #8565:
URL: https://github.com/apache/hbase/pull/8565

   JIRA: https://issues.apache.org/jira/browse/HBASE-30332
   
   Original PR: #8555
   
   ### What changes were proposed in this pull request?
   
   Backport #8555 to branch-2.
   
   This change preserves `QueryMetrics` when empty and existence-only `Result` 
instances are converted to and from protobuf. It also avoids attaching metrics 
to shared cached `Result` instances.
   
   The tests were adapted for branch-2 compatibility:
   
   - Replaced `List.of` with `Arrays.asList` and `ImmutableList.of`
   - Replaced `PrivateCellUtil.createExtendedCellScanner` with 
`CellUtil.createCellScanner`
   
   ### Why are the changes needed?
   
   `QueryMetrics` can be lost when an empty or existence-only `Result` is 
returned because the conversion paths return cached protobuf or `Result` 
instances before copying the metrics.
   
   The additional test changes are required because branch-2 uses the Java 8 
source level and does not contain the newer `createExtendedCellScanner` API.
   
   ### How was this patch tested?
   
   The following tests and formatting checks were run:
   
   ```bash
   mvn -Dhadoop.profile=3.0 \
     -pl hbase-client -am \
     -Dtest=TestProtobufUtil \
     test
   
   mvn -Dhadoop.profile=3.0 \
     -pl hbase-server -am \
     -Dtest=TestAsyncTableQueryMetrics \
     test
   
   mvn -Dhadoop.profile=3.0 \
     -pl hbase-client,hbase-server \
     spotless:check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to