gtully commented on a change in pull request #3876:
URL: https://github.com/apache/activemq-artemis/pull/3876#discussion_r765850380



##########
File path: 
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
##########
@@ -285,21 +333,41 @@ public void bufferReceived(Object connectionID, 
ActiveMQBuffer buffer) {
             traceBufferReceived(connectionID, command);
          }
 
-         final Actor<Command> localVisibleActor = openWireActor;
-         if (localVisibleActor != null) {
-            openWireActor.act(command);
-         } else {
-            act(command);
-         }
+         runOnActor(command);
       } catch (Exception e) {
          ActiveMQServerLogger.LOGGER.debug(e);
          sendException(e);
       }
 
    }
 
+   public void restoreAutoRead() {
+      if (!autoRead) {
+         autoRead = true;
+         openWireActor.act(flushWrite);
+      }
+   }
+
+   public void disableAutoRead() {
+      autoRead = false;
+      getTransportConnection().setAutoRead(false);
+   }
+
+   protected void actualEnableAutoReadAndTtl() {
+      getTransportConnection().setAutoRead(autoRead);

Review comment:
       should this no go through checkMemory - to sync up with the page store 
blocking. If the page store is still blocked we don't want to enable auto read 
till there is some space.
   
   I am thinking, we don't have to be careful about disabling auto read, b/c we 
will aways get to do it again... but with enabling, having an empty work queue 
is not sufficient, there also has to be space. so we need to coordinate the 
enabling.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to