This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 34e623c1c4 Revert "Further cleanup of Stream references to aid GC"
34e623c1c4 is described below
commit 34e623c1c4d2c21f60bdc0c7dd93d703461cf7d4
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jan 14 07:45:08 2025 +0000
Revert "Further cleanup of Stream references to aid GC"
This reverts commit aae66d630edc7d63ec64ab30d86f36d6d09b654d.
---
java/org/apache/coyote/NonPipeliningProcessor.java | 26 ----------------------
java/org/apache/coyote/Request.java | 9 --------
java/org/apache/coyote/Response.java | 9 --------
java/org/apache/coyote/http2/StreamProcessor.java | 3 +--
webapps/docs/changelog.xml | 5 -----
5 files changed, 1 insertion(+), 51 deletions(-)
diff --git a/java/org/apache/coyote/NonPipeliningProcessor.java
b/java/org/apache/coyote/NonPipeliningProcessor.java
deleted file mode 100644
index 75a6da0830..0000000000
--- a/java/org/apache/coyote/NonPipeliningProcessor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.coyote;
-
-/**
- * Marker interface used to indicate that the {@link Processor} does not
implement pipe-lining of requests (e.g.
- * HTTP/1.1 supports pipe-lining whereas HTTP/2 does not) which may enable
some components to clear references sooner
- * to aid GC.
- */
-public interface NonPipeliningProcessor extends Processor {
-
-}
diff --git a/java/org/apache/coyote/Request.java
b/java/org/apache/coyote/Request.java
index fc7fb52674..a88548c942 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -842,15 +842,6 @@ public final class Request {
startTimeNanos = -1;
threadId = 0;
-
- if (hook instanceof NonPipeliningProcessor) {
- /*
- * No requirement to maintain state between requests so clear the
hook (a.k.a. Processor) and the input
- * buffer to aid GC.
- */
- setHook(null);
- setInputBuffer(null);
- }
}
// -------------------- Info --------------------
diff --git a/java/org/apache/coyote/Response.java
b/java/org/apache/coyote/Response.java
index cb41a3d27d..e00b9a7e76 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -670,15 +670,6 @@ public final class Response {
// update counters
contentWritten = 0;
-
- if (hook instanceof NonPipeliningProcessor) {
- /*
- * No requirement to maintain state between requests so clear the
hook (a.k.a. Processor) and the output
- * buffer to aid GC.
- */
- setHook(null);
- setOutputBuffer(null);
- }
}
/**
diff --git a/java/org/apache/coyote/http2/StreamProcessor.java
b/java/org/apache/coyote/http2/StreamProcessor.java
index 2b7ea79701..a853a5dd8e 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -35,7 +35,6 @@ import org.apache.coyote.ActionCode;
import org.apache.coyote.Adapter;
import org.apache.coyote.ContinueResponseTiming;
import org.apache.coyote.ErrorState;
-import org.apache.coyote.NonPipeliningProcessor;
import org.apache.coyote.Request;
import org.apache.coyote.RequestGroupInfo;
import org.apache.coyote.Response;
@@ -53,7 +52,7 @@ import org.apache.tomcat.util.net.SocketEvent;
import org.apache.tomcat.util.net.SocketWrapperBase;
import org.apache.tomcat.util.res.StringManager;
-class StreamProcessor extends AbstractProcessor implements
NonPipeliningProcessor {
+class StreamProcessor extends AbstractProcessor {
private static final Log log = LogFactory.getLog(StreamProcessor.class);
private static final StringManager sm =
StringManager.getManager(StreamProcessor.class);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5d649c0e56..1f4bad77fd 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -200,11 +200,6 @@
<code>org.apache.catalina.connector.InputBuffer</code> with a static,
zero length buffer. (markt)
</scode>
- <scode>
- Clean-up references to the HTTP/2 stream once request processing has
- completed to aid GC and reduce the size of the HTTP/2 recycled request
- and response cache. (markt)
- </scode>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]