Skip to content

Commit

Permalink
next try to fix deadlock in plasmaWordIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
orbiter committed Apr 27, 2007
1 parent 871ee1c commit 62c947b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/de/anomic/plasma/plasmaWordIndex.java
Expand Up @@ -173,10 +173,10 @@ public void addEntry(String wordHash, indexRWIEntry entry, long updateTime, bool
if ((!dhtInCase) && (yacyDHTAction.shallBeOwnWord(wordHash))) dhtInCase = true;

// add the entry
if (dhtInCase) synchronized (dhtInCache) {
if (dhtInCase) {
dhtInCache.addEntry(wordHash, entry, updateTime, true);
dhtInFlushControl();
} else synchronized (dhtOutCache) {
} else {
dhtOutCache.addEntry(wordHash, entry, updateTime, false);
dhtOutFlushControl();
}
Expand All @@ -189,10 +189,10 @@ public void addEntries(indexContainer entries, long updateTime, boolean dhtInCas
if ((!dhtInCase) && (yacyDHTAction.shallBeOwnWord(entries.getWordHash()))) dhtInCase = true;

// add the entry
if (dhtInCase) synchronized (dhtInCache) {
if (dhtInCase) {
dhtInCache.addEntries(entries, updateTime, true);
dhtInFlushControl();
} else synchronized (dhtOutCache) {
} else {
dhtOutCache.addEntries(entries, updateTime, false);
dhtOutFlushControl();
}
Expand Down Expand Up @@ -352,7 +352,7 @@ public indexContainer getContainer(String wordHash, Set urlselection, long maxTi
return container;
}

public synchronized Map getContainers(Set wordHashes, Set urlselection, boolean deleteIfEmpty, boolean interruptIfEmpty, long maxTime) {
public Map getContainers(Set wordHashes, Set urlselection, boolean deleteIfEmpty, boolean interruptIfEmpty, long maxTime) {
// return map of wordhash:indexContainer

// retrieve entities that belong to the hashes
Expand Down

0 comments on commit 62c947b

Please sign in to comment.