[ https://issues.apache.org/jira/browse/HBASE-9963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13824582#comment-13824582 ]
Hudson commented on HBASE-9963: ------------------------------- SUCCESS: Integrated in HBase-0.94-security #337 (See [https://builds.apache.org/job/HBase-0.94-security/337/]) HBASE-9963 Fix TestHeapSize (larsh: rev 1542358) * /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.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, 0.94.14 > > 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)