-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/694/
-----------------------------------------------------------
(Updated 2010-08-20 15:51:17.366257)
Review request for hbase.
Changes
-------
New patch, I decided to dig even more into this problem as I'm thinking that
what happens in the updateLock should be as quick as possible. The difference
with the previous patch is that the new HLog is created before we take the
updateLock, as well as all the preparation surrounding that. Then I tested on a
randomWrite 4 + 6 incrementing threads on a single RS that was instrumented to
sysout the time it took to go through the sync block in rollWriter.
Without the patch:
Test duration: 406835ms
Total sync block duration: 56048ms
Percentage of the time updates were blocked: 13.7%
Average time in sync block: 610ms
Median time in sync block: 37ms
With the patch:
Test duration: 383503ms
Total sync block duration: 14072ms
Percentage of the time updates were blocked: 3.6%
Average time in sync block: 142ms
Median time in sync block: 3ms
Comments:
I was surprised by how closing a HLog could take a wildly varying time. In both
cases I saw multi-seconds to close a writer (as you can tell by the averages
compared to medians). In any case, my patch makes it much faster and less
blocking. Your mileage may vary.
Summary
-------
Simply moves the LogActionListeners and outputfiles handling out of the
updateLock synchronization.
This addresses bug HBASE-2922.
http://issues.apache.org/jira/browse/HBASE-2922
Diffs (updated)
-----
/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
987355
Diff: http://review.cloudera.org/r/694/diff
Testing
-------
Unit tests and some PEs.
Thanks,
Jean-Daniel