Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Fixes hanging FlushThread (see http://forum.yacy-websuche.de/viewtopic.php?f=5&t=5447) by replacing put() method by the more robust add() to add a merge job to the queue.
otter74c7e8b68617
diff --git a/source/net/yacy/kelondro/rwi/IODispatcher.java b/source/net/yacy/kelondro/rwi/IODispatcher.javaindex 6368576a4..b51d54bef 100644--- a/source/net/yacy/kelondro/rwi/IODispatcher.java+++ b/source/net/yacy/kelondro/rwi/IODispatcher.java@@ -124,15 +124,15 @@ public class IODispatcher extends Thread {final MergeJob job = new MergeJob(f1, f2, factory, array, newFile);if (isAlive()) {try {- this.mergeQueue.put(job);+ this.mergeQueue.add(job);if (f2 == null) {log.info("appended rewrite job of file " + f1.getName() + " to " + newFile.getName());} else {log.info("appended merge job of files " + f1.getName() + ", " + f2.getName() + " to " + newFile.getName());}- } catch (final InterruptedException e) {- log.warn("interrupted: " + e.getMessage(), e);- array.mergeMount(f1, f2, factory, newFile, (int) Math.min(MemoryControl.available() / 3, this.writeBufferSize));+ } catch (final Exception e) {+ log.warn("Could not add merge job to queue: " + e.getMessage(), e);+ array.mergeMount(f1, f2, factory, newFile, (int) Math.min(MemoryControl.available() / 3, this.writeBufferSize));} finally {this.controlQueue.release();}