From ee70585289ca7a5d0229934af000e8f45c7bc6ec Mon Sep 17 00:00:00 2001 From: Andrew Kyle Purtell Date: Mon, 22 Mar 2010 18:20:47 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 2 ++ .../java/org/apache/hadoop/hbase/regionserver/wal/HLog.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index f6a1e2c187f..2b01f8333ab 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 diff --git a/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java b/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java index 09c9c0a400e..5bd3fdd7fff 100644 --- a/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java +++ b/core/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java @@ -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 logWriters = - new TreeMap(Bytes.BYTES_COMPARATOR); + Collections.synchronizedMap( + new TreeMap(Bytes.BYTES_COMPARATOR)); List splits = null; // Number of threads to use when log splitting to rewrite the logs.