#2488 use local data map
This commit is contained in:
parent
46a9aee502
commit
b7d56472a1
1 changed files with 5 additions and 3 deletions
|
@ -130,21 +130,23 @@ public class FileListIndexUpdateCallbackImpl implements IndexUpdateCallback {
|
|||
final Deque<String> urlQueue = new LinkedList<>();
|
||||
urlQueue.offer(url);
|
||||
while (!urlQueue.isEmpty() && (maxAccessCount < 0 || counter < maxAccessCount)) {
|
||||
final Map<String, Object> localDataMap =
|
||||
dataMap.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
String processingUrl = urlQueue.poll();
|
||||
if (deleteUrlList.contains(processingUrl)) {
|
||||
deleteDocuments(); // delete before indexing
|
||||
}
|
||||
try {
|
||||
for (int i = 0; i < maxRedirectCount; i++) {
|
||||
processingUrl = processRequest(paramMap, dataMap, processingUrl, client);
|
||||
processingUrl = processRequest(paramMap, localDataMap, processingUrl, client);
|
||||
if (processingUrl == null) {
|
||||
break;
|
||||
}
|
||||
counter++;
|
||||
dataMap.put(fessConfig.getIndexFieldUrl(), processingUrl);
|
||||
localDataMap.put(fessConfig.getIndexFieldUrl(), processingUrl);
|
||||
}
|
||||
} catch (ChildUrlsException e) {
|
||||
e.getChildUrlList().stream().map(req -> req.getUrl()).forEach(urlQueue::offer);
|
||||
e.getChildUrlList().stream().map(RequestData::getUrl).forEach(urlQueue::offer);
|
||||
} catch (DataStoreCrawlingException e) {
|
||||
Throwable cause = e.getCause();
|
||||
if (cause instanceof ChildUrlsException) {
|
||||
|
|
Loading…
Add table
Reference in a new issue