Deadlock in WAL archiver fixed - Fixes
@@ -1913,16 +1913,17 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
* @throws StorageException If exception occurred in the archiver thread.
*/
private long nextAbsoluteSegmentIndex() throws StorageException, IgniteInterruptedCheckedException {
- synchronized (this) {
if (cleanErr != null)
throw cleanErr;
try {
long nextIdx = segmentAware.nextAbsoluteSegmentIndex();
+ synchronized (this) {
// Wait for formatter so that we do not open an empty file in DEFAULT mode.
while (nextIdx % dsCfg.getWalSegments() > formatted && cleanErr == null)
wait();
+ }
if (cleanErr != null)
throw cleanErr;
@@ -1939,7 +1940,6 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
throw new IgniteInterruptedCheckedException(e);
}
}
- }
/**
* @param absIdx Segment absolute index.
