You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stormcrawler.apache.org by dp...@apache.org on 2026/09/25 18:29:50 UTC
(stormcrawler) 04/05: #2097 ParserBolt: leave the fork's socket timeout to Tika
This is an automated email from the ASF dual-hosted git repository.
dpol1 pushed a commit to branch tika-pipes-parser-timeout
in repository https://gitbox.apache.org/repos/asf/stormcrawler.git
commit fdfa246eb4a38e47eec180296dd6b3ba40faf76a
Author: Davide Polato <dp...@apache.org>
AuthorDate: Fri Sep 25 20:22:12 2026 +0200
#2097 ParserBolt: leave the fork's socket timeout to Tika
TimeoutLimits bounds the parse. From Tika 4.1 the socket timeout also
shuts down an idle fork and must stay above the 1s heartbeat.
Signed-off-by: Davide Polato <dp...@apache.org>
---
.../tika/src/main/java/org/apache/stormcrawler/tika/ParserBolt.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/external/tika/src/main/java/org/apache/stormcrawler/tika/ParserBolt.java b/external/tika/src/main/java/org/apache/stormcrawler/tika/ParserBolt.java
index 538cda02..c122457c 100644
--- a/external/tika/src/main/java/org/apache/stormcrawler/tika/ParserBolt.java
+++ b/external/tika/src/main/java/org/apache/stormcrawler/tika/ParserBolt.java
@@ -549,8 +549,8 @@ public class ParserBolt extends BaseRichBolt {
}
/**
- * Builds the {@link PipesForkParser} used under {@link #PARSE_TIMEOUT_PARAM}: the parent kills
- * the forked process outright via {@code socketTimeoutMillis}, not cooperative interruption.
+ * Builds the {@link PipesForkParser} used under {@link #PARSE_TIMEOUT_PARAM}: the fork kills a parse
+ * that runs past its {@code TimeoutLimits} outright, without relying on cooperative interruption.
*/
private PipesForkParser buildPipesForkParser(Map<String, Object> conf) {
PipesForkParserConfig pipesConfig = new PipesForkParserConfig();
@@ -563,8 +563,6 @@ public class ParserBolt extends BaseRichBolt {
pipesConfig.setParseMode(ParseMode.CONCATENATE);
pipesConfig.setMaxEmbeddedCount(extractEmbedded ? -1 : 0);
pipesConfig.setTimeoutLimits(new TimeoutLimits(parseTimeout, parseTimeout));
- // the real enforcement: kills the forked process outright if it doesn't respond in time
- pipesConfig.getPipesConfig().setSocketTimeoutMillis(parseTimeout);
if (resolvedTikaConfigPath != null) {
pipesConfig.setUserConfigPath(resolvedTikaConfigPath);
}