You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2022/06/13 16:47:00 UTC

[jira] [Resolved] (HBASE-6277) Metrics for scan object are overwritten when restart() is called

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

Andrew Kyle Purtell resolved HBASE-6277.
----------------------------------------
    Resolution: Invalid

> Metrics for scan object are overwritten when restart() is called
> ----------------------------------------------------------------
>
>                 Key: HBASE-6277
>                 URL: https://issues.apache.org/jira/browse/HBASE-6277
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Major
>
> From HBASE-4145:
> There's an issue in {{TableRecordReaderImpl}}. Calling restart() does this:
> {code}
> public void restart(byte[] firstRow) throws IOException {
>   currentScan = new Scan(scan);
> {code}
> Which by itself is fine since the metrics will be copied from *scan* to *currentScan*, except that it's *currentScan* that has the updated metrics not *scan*.
> In other words, *currentScan* is the object that is used for scanning so it contains the metrics. If restart() is called, that object is overwritten by the original definition of the {{Scan}}. I think to fix this we could grab the metrics from *currentScan* first then set them back on the new object.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)