[
https://issues.apache.org/jira/browse/HBASE-9754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793561#comment-13793561
]
Lars Hofhansl commented on HBASE-9754:
--------------------------------------
The idea is this:
* In HRegion.RegionScannerImpl.<init> pass the current readpoint to
store.getScanner(...)
* From there pass it to StoreScanner.<init>
* on to StoreScanner.getScannersNoCompaction(...)
* to Store.getScanners()
* and finally memstore.getScanners() and StoreFileScanner
.getScannersForStoreFiles(...)
This will need to tedious refactoring of all the StoreScanner constructors to
do the right thing in all cases, but in principle it is not difficult.
That way MVCC.setThreadReadPoint and MVCC.getThreadReadPoint will be
unnecessary and we can get rid of MVCC.perThreadReadPoint completely. Should be
a nice improvement for performance and readability.
> Consider eliminating threadlocals from MVCC code
> ------------------------------------------------
>
> Key: HBASE-9754
> URL: https://issues.apache.org/jira/browse/HBASE-9754
> Project: HBase
> Issue Type: Bug
> Reporter: Lars Hofhansl
>
> Brought up by [~vrodionov] and [[email protected]].
> Currently we use ThreadLocals to communicate the current readpoint between a
> RegionScanner and the Store\{File}Scanner's down the stack.
> Since ThreadLocals are not cheap we should consider whether it is possible to
> pass the readpoint through the call stack instead.
--
This message was sent by Atlassian JIRA
(v6.1#6144)