HADOOP-17142. Fix outdated properties of JournalNode when performing rollback. Contributed by Deegue.
(cherry picked from commit 82de07c794fe119946bec2e563c1937f312e8ac9) (cherry picked from commit 12bfd9194a1b6ff89fb31f1f49e69c727f844155) (cherry picked from commit 52c2ce53c25738713c6bc2b710249dd708c3d9de)
This commit is contained in:
parent
5085934c90
commit
e2d7e72c1b
@ -236,6 +236,10 @@ void format(NamespaceInfo nsInfo) throws IOException {
|
||||
|
||||
void analyzeStorage() throws IOException {
|
||||
this.state = sd.analyzeStorage(StartupOption.REGULAR, this);
|
||||
refreshStorage();
|
||||
}
|
||||
|
||||
void refreshStorage() throws IOException {
|
||||
if (state == StorageState.NORMAL) {
|
||||
readProperties(sd);
|
||||
}
|
||||
|
@ -1178,6 +1178,8 @@ public synchronized void doRollback() throws IOException {
|
||||
// directory will be renamed. It will be reopened lazily on next access.
|
||||
IOUtils.cleanup(LOG, committedTxnId);
|
||||
storage.getJournalManager().doRollback();
|
||||
// HADOOP-17142: refresh properties after rollback performed.
|
||||
storage.refreshStorage();
|
||||
}
|
||||
|
||||
synchronized void discardSegments(long startTxId) throws IOException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user