[
https://issues.apache.org/jira/browse/HBASE-15716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15259385#comment-15259385
]
stack commented on HBASE-15716:
-------------------------------
bq. The problem is that adding a readpoint and finding the oldest need to be in
sync.
The mvcc read point is itself an atomic and always ascending.
getSmallestReadpoint starts with current mvcc read point gotten from mvcc.
A thread will find its smallest read point by iterating the CHM or in the mvcc.
I suppose there is the possibility that:
# Start to construct scanner
# Get read point A but we have not put it into the CHM yet
# Another thread calls getSmallestReadpoint and gets current mvcc readpoint
A... this is fine
# Another thread moves the read point forward to B
# Another thread again calls getSmallestReadpoint and gets the advanced mvcc
readpoint B
# Some cleanup of Cells happens based off readpoint B
# NOW we add the readpoint A to the region CHM
... damage is done.
> HRegion#RegionScannerImpl scannerReadPoints synchronization costs
> -----------------------------------------------------------------
>
> Key: HBASE-15716
> URL: https://issues.apache.org/jira/browse/HBASE-15716
> Project: HBase
> Issue Type: Bug
> Components: Performance
> Reporter: stack
> Attachments: 15716.prune.synchronizations.patch, Screen Shot
> 2016-04-26 at 2.05.45 PM.png, Screen Shot 2016-04-26 at 2.06.14 PM.png,
> Screen Shot 2016-04-26 at 2.07.06 PM.png, Screen Shot 2016-04-26 at 2.25.26
> PM.png, Screen Shot 2016-04-26 at 6.02.29 PM.png, remove_cslm.patch
>
>
> Here is a [~lhofhansl] special.
> When we construct the region scanner, we get our read point and then store it
> with the scanner instance in a Region scoped CSLM. This is done under a
> synchronize on the CSLM.
> This synchronize on a region-scoped Map creating region scanners is the
> outstanding point of lock contention according to flight recorder (My work
> load is workload c, random reads).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)