wy96f commented on a change in pull request #2845: ARTEMIS-2336 Use zero copy 
to replicate journal/page/large message file (AGAIN)
URL: https://github.com/apache/activemq-artemis/pull/2845#discussion_r327435982
 
 

 ##########
 File path: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
 ##########
 @@ -355,12 +373,24 @@ private boolean canWrite(final int requiredCapacity) {
       return canWrite;
    }
 
-   private Object getFileObject(RandomAccessFile raf, FileChannel fileChannel, 
long offset, int dataSize) {
-      if (channel.pipeline().get(SslHandler.class) == null) {
-         return new NonClosingDefaultFileRegion(fileChannel, offset, dataSize);
+   private Object getFileObject(FileChannel fileChannel, long offset, int 
dataSize) {
+      if (USE_FILE_REGION && channel.pipeline().get(SslHandler.class) == null) 
{
 
 Review comment:
   There is some problem with -Dio.netty.file.region=false. Some page files 
seemingly are not transferred. At last replication failed, the log showed:
   ```
   2019-09-24 13:38:37,508 WARN  [org.apache.activemq.artemis.core.server] 
AMQ222010: Critical IO Error, shutting down the server. file=NULL, 
message=AMQ229114: Replication synchronization process timed out after waiting 
30,000 milliseconds: 
ActiveMQReplicationTimeooutException[errorType=REPLICATION_TIMEOUT_ERROR 
message=AMQ229114: Replication synchronization process timed out after waiting 
30,000 milliseconds]
           at 
org.apache.activemq.artemis.core.replication.ReplicationManager.sendSynchronizationDone(ReplicationManager.java:687)
 [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
           at 
org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.startReplication(JournalStorageManager.java:699)
 [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
           at 
org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation$2.run(SharedNothingLiveActivation.java:178)
 [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
           at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
   
   2019-09-24 13:38:37,509 WARN  [org.apache.activemq.artemis.core.server] 
AMQ222251: Unable to start replication: 
ActiveMQReplicationTimeooutException[errorType=REPLICATION_TIMEOUT_ERROR 
message=AMQ229114: Replication synchronization process timed out after waiting 
30,000 milliseconds]
           at 
org.apache.activemq.artemis.core.replication.ReplicationManager.sendSynchronizationDone(ReplicationManager.java:687)
 [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
           at 
org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.startReplication(JournalStorageManager.java:699)
 [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
           at 
org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation$2.run(SharedNothingLiveActivation.java:178)
 [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
           at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
   ```
   I am looking at it now.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to