You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by dpospisil <gi...@git.apache.org> on 2016/03/21 12:31:44 UTC

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

GitHub user dpospisil opened a pull request:

    https://github.com/apache/activemq-artemis/pull/425

    [ARTEMIS-444] Extend AIOSequentialFileFactory to check underlying FS

    https://issues.apache.org/jira/browse/ARTEMIS-444

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dpospisil/activemq-artemis ARTEMIS-444

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/425.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #425
    
----
commit 2fd1508a0c5ccfd6fcdf71490ba21517eae6ece4
Author: Dominik Pospisil <dp...@redhat.com>
Date:   2016-03-21T11:25:45Z

    [ARTEMIS-444] Extend AIOSequentialFileFactory to check underlying FS

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/425#issuecomment-199261156
  
    the method seems right, but you're never using the new method you added?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

Posted by dpospisil <gi...@git.apache.org>.
Github user dpospisil commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/425#issuecomment-199705907
  
    I have tried to avod NIO swich as much as possible. My concern was a situation where e.g. file privilegues would block access to the journal which would make AIO open to fail and than fallback to NIO. But If you don't like it let me know I'll remove it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/425


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

Posted by dpospisil <gi...@git.apache.org>.
Github user dpospisil commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/425#issuecomment-199326767
  
    I have updated the PR so the ActiveMQServer uses it as suggested.
    
    I have also improved the check so that it returns false (unsupported) only if AIO check fails and plain java pass.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/425#issuecomment-199268909
  
    ActiveMQServer::initialisePart1 needs this change: 
    
       synchronized boolean initialisePart1(boolean scalingDown) throws Exception {
          if (state == SERVER_STATE.STOPPED)
             return false;
    
          // Create the pools - we have two pools - one for non scheduled - and another for scheduled
          initializeExecutorServices();
    
          if (configuration.getJournalType() == JournalType.ASYNCIO && !AIOSequentialFileFactory.isSupported(configuration.getJournalDirectory())) {



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

Posted by andytaylor <gi...@git.apache.org>.
Github user andytaylor commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/425#issuecomment-199269101
  
    Can you improve this so the log message makes sense and to actually use the method. so something like 'LIBAIO is installed but /path/somewhere does not support AIO'. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/425#discussion_r56841836
  
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java ---
    @@ -114,6 +116,36 @@ public static boolean isSupported() {
           return LibaioContext.isLoaded();
        }
     
    +   public static boolean isSupported(File journalPath) {
    +      if (!isSupported()) {
    +         return false;
    +      }
    +
    +      File aioTestFile = new File(journalPath, AIO_TEST_FILE);
    +      try {
    +         int fd = LibaioContext.open(aioTestFile.getAbsolutePath(), true);
    +         LibaioContext.close(fd);
    +         aioTestFile.delete();
    +      }
    +      catch (Exception e) {
    +         // try to handle the file using plain Java
    +         // return false if and only if we can create/remove the file using
    +         // plain Java but not using AIO
    +         try {
    +            if (!aioTestFile.exists()) {
    +               if (!aioTestFile.createNewFile()) return true;
    --- End diff --
    
    Isn't that a bit convoluted?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: [ARTEMIS-444] Extend AIOSequentialF...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/425#issuecomment-199271618
  
    +1 on adding a message with anything saying the device on path ('/actualpath') doesn't support libaio, switching to NIO.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---