HBASE-820 Need mainline to flush when 'Blocking updates' goes up.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@685234 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-08-12 17:23:11 +00:00
parent 7a33adc974
commit 14160de524
2 changed files with 10 additions and 1 deletions

View File

@ -12,6 +12,8 @@ Release 0.3.0 - Unreleased
HBASE-819 Remove DOS-style ^M carriage returns from all code where found
(Jonathan Gray via Jim Kellerman)
HBASE-818 Deadlock running 'flushSomeRegions' (Andrew Purtell via Stack)
HBASE-821 Need mainline to flush when 'Blocking updates' goes up.
(Jean-Daniel Cryans via Stack)
IMPROVEMENTS
HBASE-801 When a table haven't disable, shell could response in a "user

View File

@ -1423,7 +1423,14 @@ public class HRegion implements HConstants {
* this and the synchronize on 'this' inside in internalFlushCache to send
* the notify.
*/
private synchronized void checkResources() {
private void checkResources() {
if (this.memcacheSize.get() > this.blockingMemcacheSize) {
requestFlush();
doBlocking();
}
}
private synchronized void doBlocking() {
boolean blocked = false;
while (this.memcacheSize.get() > this.blockingMemcacheSize) {
if (!blocked) {