HBASE-2355 Unsynchronized logWriters map is mutated from several threads in HLog splitting

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@926242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2010-03-22 18:20:47 +00:00
parent 6befceaf93
commit ee70585289
2 changed files with 4 additions and 1 deletions

View File

@ -248,6 +248,8 @@ Release 0.21.0 - Unreleased
speed (Paul Smith via Stack)
HBASE-2336 Fix build broken with HBASE-2334 (Lars Francke via Lars George)
HBASE-2283 row level atomicity (Kannan Muthukkaruppan via Stack)
HBASE-2355 Unsynchronized logWriters map is mutated from several threads in
HLog splitting (Todd Lipcon via Andrew Purtell)
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

View File

@ -1108,7 +1108,8 @@ public class HLog implements HConstants, Syncable {
Path oldLogDir, final FileStatus[] logfiles, final FileSystem fs,
final Configuration conf) throws IOException {
final Map<byte [], WriterAndPath> logWriters =
new TreeMap<byte [], WriterAndPath>(Bytes.BYTES_COMPARATOR);
Collections.synchronizedMap(
new TreeMap<byte [], WriterAndPath>(Bytes.BYTES_COMPARATOR));
List<Path> splits = null;
// Number of threads to use when log splitting to rewrite the logs.