[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-17 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: 9754-rp-hregion-v3.txt

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt, 9754-rp-1.txt, 9754-rp-hregion.txt, 
> 9754-rp-hregion-v2.txt, 9754-rp-hregion-v3.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-17 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: (was: 9754-rp-hregion-v3.txt)

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt, 9754-rp-1.txt, 9754-rp-hregion.txt, 
> 9754-rp-hregion-v2.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-17 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: 9754-rp-hregion-v3.txt

Updated 9754-rp-hregion-v3.txt with comment on why 0 is passed as readpoint in 
certain places.

Also replaced smallestReadPoint in tests.

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt, 9754-rp-1.txt, 9754-rp-hregion.txt, 
> 9754-rp-hregion-v2.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-17 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: (was: 9754-rp-hregion-v3.txt)

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt, 9754-rp-1.txt, 9754-rp-hregion.txt, 
> 9754-rp-hregion-v2.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-17 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: 9754-rp-hregion-v3.txt

New patch that replaces 0 read point parameter value with proper value.

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt, 9754-rp-1.txt, 9754-rp-hregion.txt, 
> 9754-rp-hregion-v2.txt, 9754-rp-hregion-v3.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-17 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: 9754-rp-hregion-v2.txt

Good point, Chunhui.

In latest patch, I refactored Compactor#createFileScanners() and 
Compactor#setSmallestReadPoint() which are called by DefaultCompactor#compact().

Now store.getSmallestReadPoint() is only called once.

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt, 9754-rp-1.txt, 9754-rp-hregion.txt, 
> 9754-rp-hregion-v2.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-16 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: 9754-rp-hregion.txt

9754-rp-hregion.txt avoids changing signature of preStoreScannerOpen() by 
allowing RegionObserver to query underlying region the correct read point.

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt, 9754-rp-1.txt, 9754-rp-hregion.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-16 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: 9754-rp-1.txt

New patch that adds readpoint parameter to preStoreScannerOpen().
The reasoning is that when user overrides preStoreScannerOpen(), the user 
should know the readpoint which makes store scanner function correctly.

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt, 9754-rp-1.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-15 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: 9754-rp-0.txt

Rebased patch.

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-15 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: (was: 9754-rp-0.txt)

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-14 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Attachment: 9754-rp-0.txt

Initial patch.

I ran the following unit tests locally and they passed:
{code}
 1164  mt2 -Dtest=TestMemStore
 1167  mt2 
-Dtest=TestCoprocessorScanPolicy,TestMemStoreChunkPool,TestFSErrorsExposed,TestRegionObserverScannerOpenHook
 1173  mt2 -Dtest=TestHRegion
 1175  mt2 -Dtest=TestJoinedScanners
{code}
API changes are in classes marked @InterfaceAudience.Private

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-14 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-9754:
--

Fix Version/s: 0.98.0
   Status: Patch Available  (was: Open)

> 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
>Assignee: Ted Yu
> Fix For: 0.98.0
>
> Attachments: 9754-rp-0.txt
>
>
> Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
> 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)


[jira] [Updated] (HBASE-9754) Consider eliminating threadlocals from MVCC code

2013-10-12 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl updated HBASE-9754:
-

Description: 
Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
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.


  was:
Brought up by [~vrodionov] and [~yuzhih...@gmail.com].
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.



> 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 [~yuzhih...@gmail.com].
> 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)