[
https://issues.apache.org/jira/browse/HBASE-9963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13822551#comment-13822551
]
Hudson commented on HBASE-9963:
-------------------------------
SUCCESS: Integrated in HBase-TRUNK #4680 (See
[https://builds.apache.org/job/HBase-TRUNK/4680/])
HBASE-9963 Remove the ReentrantReadWriteLock in the MemStore (nkeywal: rev
1541880)
*
/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
* /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
*
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
*
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
*
/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestHeapSize.java
> Remove the ReentrantReadWriteLock in the MemStore
> -------------------------------------------------
>
> Key: HBASE-9963
> URL: https://issues.apache.org/jira/browse/HBASE-9963
> Project: HBase
> Issue Type: Improvement
> Components: regionserver
> Affects Versions: 0.98.0, 0.96.0
> Reporter: Nicolas Liochon
> Assignee: Nicolas Liochon
> Priority: Minor
> Fix For: 0.98.0, 0.96.1
>
> Attachments: 9963.96.v3.patch, 9963.v1.patch, 9963.v2.patch,
> 9963.v3.patch
>
>
> If I'm not wrong, the MemStore is always used from the HStore. The code in
> HStore puts a lock before calling MemStore. So the lock in Memstore is
> useless.
> For example, in HStore
> {code}
> @Override
> public long upsert(Iterable<Cell> cells, long readpoint) throws IOException
> {
> this.lock.readLock().lock();
> try {
> return this.memstore.upsert(cells, readpoint);
> } finally {
> this.lock.readLock().unlock();
> }
> }
> {code}
> With this in MemStore
> {code}
> public long upsert(Iterable<Cell> cells, long readpoint) {
> this.lock.readLock().lock(); // <==========Am I useful?
> try {
> long size = 0;
> for (Cell cell : cells) {
> size += upsert(cell, readpoint);
> }
> return size;
> } finally {
> this.lock.readLock().unlock();
> }
> }
> {code}
> I've checked, all the locks in MemStore are backed by a lock in HStore, the
> only exception beeing
> {code}
> void snapshot() {
> this.memstore.snapshot();
> }
> {code}
> And I would say it's a bug. If it's confirm ([~lhofhansl], what do you
> think?), I will add a lock there and remove all of them in MemStore. They do
> appear in the profiling.
--
This message was sent by Atlassian JIRA
(v6.1#6144)