HBASE-4387 Error while syncing: DFSOutputStream is closed
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1174906 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d4c706f1b4
commit
da5f1baa39
|
@ -296,6 +296,7 @@ Release 0.92.0 - Unreleased
|
|||
znode version mismatch (Ramkrishna)
|
||||
HBASE-4446 Rolling restart RSs scenario, regions could stay in OPENING state
|
||||
(Ming Ma)
|
||||
HBASE-4387 Error while syncing: DFSOutputStream is closed
|
||||
|
||||
TESTS
|
||||
HBASE-4450 test for number of blocks read: to serve as baseline for expected
|
||||
|
|
|
@ -1061,8 +1061,17 @@ public class HLog implements Syncable {
|
|||
try {
|
||||
long now = System.currentTimeMillis();
|
||||
// Done in parallel for all writer threads, thanks to HDFS-895
|
||||
this.writer.sync();
|
||||
boolean syncSuccessful = true;
|
||||
try {
|
||||
this.writer.sync();
|
||||
} catch(IOException io) {
|
||||
syncSuccessful = false;
|
||||
}
|
||||
synchronized (this.updateLock) {
|
||||
if (!syncSuccessful) {
|
||||
// HBASE-4387, retry with updateLock held
|
||||
this.writer.sync();
|
||||
}
|
||||
syncTime += System.currentTimeMillis() - now;
|
||||
syncOps++;
|
||||
if (!this.logRollRunning) {
|
||||
|
|
Loading…
Reference in New Issue