diff options
| author | pr0vieh <pr0vieh@gmail.com> | 2026-01-21 23:46:43 +0100 |
|---|---|---|
| committer | pr0vieh <pr0vieh@gmail.com> | 2026-01-21 23:46:43 +0100 |
| commit | 2744918f9fa10885d01fe801f5d4c88da372ef94 (patch) | |
| tree | 79120dfb32d93c9f3a6b2b5bd9a118d2a2dca1c4 /source | |
| parent | fa61beff3550850253055393b89aa18d4c5f705d (diff) | |
Add DNS/network errors (-1) to permanent error status codes
- DNS errors (NXDOMAIN, SERVFAIL, UnknownHostException) now treated as permanent failures
- Updated default permanentStatus from '404,410' to '404,410,-1'
- Added documentation explaining -1 status code represents DNS/network failures
- Updated UI description in IndexFederated_p.html to reflect DNS error handling
- Affects both transferURL and transferRWI DHT operations
Diffstat (limited to 'source')
| -rw-r--r-- | source/net/yacy/htroot/IndexFederated_p.java | 2 | ||||
| -rw-r--r-- | source/net/yacy/htroot/yacy/transferRWI.java | 2 | ||||
| -rw-r--r-- | source/net/yacy/htroot/yacy/transferURL.java | 2 | ||||
| -rw-r--r-- | source/net/yacy/search/SwitchboardConstants.java | 1 |
4 files changed, 4 insertions, 3 deletions
diff --git a/source/net/yacy/htroot/IndexFederated_p.java b/source/net/yacy/htroot/IndexFederated_p.java index 9b7e8f74c..4acf5d996 100644 --- a/source/net/yacy/htroot/IndexFederated_p.java +++ b/source/net/yacy/htroot/IndexFederated_p.java @@ -72,7 +72,7 @@ public class IndexFederated_p { final int retryDays = post.getInt(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS, 30); env.setConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS, retryDays); - final String permanent = post.get(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410"); + final String permanent = post.get(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410,-1"); env.setConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, permanent); } diff --git a/source/net/yacy/htroot/yacy/transferRWI.java b/source/net/yacy/htroot/yacy/transferRWI.java index d02875334..38c0bbbc4 100644 --- a/source/net/yacy/htroot/yacy/transferRWI.java +++ b/source/net/yacy/htroot/yacy/transferRWI.java @@ -246,7 +246,7 @@ public final class transferRWI { // Get configuration
final int retryAfterDays = sb.getConfigInt(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS, 30);
- final String permanentStatusStr = sb.getConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410");
+ final String permanentStatusStr = sb.getConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410,-1");
final Set<Integer> permanentStatus = new HashSet<Integer>();
for (String s : permanentStatusStr.split(",")) {
try { permanentStatus.add(Integer.parseInt(s.trim())); } catch (NumberFormatException e) {}
diff --git a/source/net/yacy/htroot/yacy/transferURL.java b/source/net/yacy/htroot/yacy/transferURL.java index 2ca3f533a..07af06601 100644 --- a/source/net/yacy/htroot/yacy/transferURL.java +++ b/source/net/yacy/htroot/yacy/transferURL.java @@ -154,7 +154,7 @@ public final class transferURL { doublecheck = 0;
final boolean blockErrors = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS, true);
final int retryAfterDays = sb.getConfigInt(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS, 30);
- final String permanentStatusStr = sb.getConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410");
+ final String permanentStatusStr = sb.getConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410,-1");
final Set<Integer> permanentStatus = new HashSet<Integer>();
for (String s : permanentStatusStr.split(",")) {
try { permanentStatus.add(Integer.parseInt(s.trim())); } catch (NumberFormatException e) {}
diff --git a/source/net/yacy/search/SwitchboardConstants.java b/source/net/yacy/search/SwitchboardConstants.java index 3873e15eb..0e391e8ac 100644 --- a/source/net/yacy/search/SwitchboardConstants.java +++ b/source/net/yacy/search/SwitchboardConstants.java @@ -209,6 +209,7 @@ public final class SwitchboardConstants { public static final String INDEX_RECEIVE_BLOCK_BLACKLIST = "indexReceiveBlockBlacklist"; public static final String INDEX_RECEIVE_BLOCK_ERRORS = "indexReceiveBlockErrors"; public static final String INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS = "indexReceiveBlockErrors.retryAfterDays"; + /** Permanent error HTTP status codes (comma-separated). Default: 404,410,-1 (-1=DNS/network errors) */ public static final String INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT = "indexReceiveBlockErrors.permanentStatus"; /** |
