[ 
https://issues.apache.org/jira/browse/QPID-8788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130754#comment-18130754
 ] 

ASF GitHub Bot commented on QPID-8788:
--------------------------------------

dakirily commented on code in PR #463:
URL: https://github.com/apache/qpid-broker-j/pull/463#discussion_r4357267600


##########
broker-core/src/test/java/org/apache/qpid/server/transport/NonBlockingConnectionTestHelper.java:
##########
@@ -0,0 +1,83 @@
+/*
+ * 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.qpid.server.transport;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.nio.ByteBuffer;
+import java.nio.channels.SocketChannel;
+import java.util.function.BooleanSupplier;
+
+import org.apache.qpid.server.logging.EventLogger;
+import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.port.AmqpPort;
+
+final class NonBlockingConnectionTestHelper
+{
+    private NonBlockingConnectionTestHelper()
+    {

Review Comment:
   Please provide a comment explaining empty private constructor





> [Broker-J] Connection close can exceed the configured timeout under transport 
> backpressure
> ------------------------------------------------------------------------------------------
>
>                 Key: QPID-8788
>                 URL: https://issues.apache.org/jira/browse/QPID-8788
>             Project: Qpid
>          Issue Type: Bug
>          Components: Broker-J
>    Affects Versions: qpid-java-broker-10.1.1
>            Reporter: Kato Kaito
>            Priority: Major
>             Fix For: qpid-java-broker-10.2.0
>
>         Attachments: threaddump.txt
>
>
> When an AMQP client stops reading from a native TCP/TLS connection, pending 
> outgoing data can prevent the broker from completing a connection close 
> requested through management. The connection can remain open beyond the 
> configured connection.closeResponseTimeout, retaining resources and delaying 
> administrative operations that wait for closure. If no other timeout or 
> transport error intervenes, this can continue indefinitely.
> The close request is queued for processing by an I/O worker. Under 
> backpressure, the transport defers pending protocol work until sufficient 
> output has drained. Because the close timeout is currently armed only when 
> that queued close work executes, the request can remain blocked without an 
> active close deadline. Even when the deadline is armed, its expiry initiates 
> normal transport shutdown, which can introduce an additional wait for 
> final-write retries.
> The configured timeout should cover both sending the protocol close and 
> waiting for the peer’s response, starting when closing is requested. Once it 
> expires, the broker should discard remaining output, close the transport, and 
> release the associated buffers. Repeated close requests should not extend the 
> deadline.
> Reproduced using AMQP 0-9-1 over plain TCP with 
> connection.closeResponseTimeout=2000. At 30 seconds after requesting closure 
> through HTTP management, the connection remained ACTIVE, its TCP socket 
> remained ESTABLISHED, and the management request was still pending. The 
> attached thread dump shows the management thread waiting in 
> CompletableFuture.get, reached through AbstractConfiguredObject.delete and 
> LatestManagementController.delete. 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to