This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git

commit 30a2d21d9134e2598ba0e92673cc4dd0ea446602
Author: Andy Seaborne <[email protected]>
AuthorDate: Fri Nov 8 10:33:14 2024 +0000

    Explicit abort on query read exceptions
---
 .../java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java
index ab91c0fbe0..f0b4199ce9 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java
@@ -283,16 +283,22 @@ public abstract class SPARQLQueryProcessor extends 
ActionService
             }
         }
         catch (QueryParseException ex) {
+            abortSilent(action);
             // Late stage static error (e.g. bad fixed Lucene query string).
             ServletOps.errorBadRequest("Query parse error: \n" + queryString + 
"\n" + SPARQLProtocol.messageForException(ex));
         }
         catch (QueryCancelledException ex) {
+            abortSilent(action);
             // Additional counter information.
             incCounter(action.getEndpoint().getCounters(), QueryTimeouts);
             throw ex;
         } finally { action.endRead(); }
     }
 
+    private static void abortSilent(HttpAction action) {
+        action.abortSilent();
+    }
+
     /**
      * Check the query - if unacceptable, throw ActionErrorException
      * or call on of the {@link ServletOps#error} operations.

Reply via email to