You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/05/20 20:13:17 UTC

[GitHub] [activemq-artemis] gtully opened a new pull request #3592: ARTEMIS-3311 - ensure visibility of error state on operation context …

gtully opened a new pull request #3592:
URL: https://github.com/apache/activemq-artemis/pull/3592


   …callback registration, fix and test


-- 
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:
users@infra.apache.org



[GitHub] [activemq-artemis] gtully merged pull request #3592: ARTEMIS-3311 - ensure visibility of error state on operation context …

Posted by GitBox <gi...@apache.org>.
gtully merged pull request #3592:
URL: https://github.com/apache/activemq-artemis/pull/3592


   


-- 
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:
users@infra.apache.org



[GitHub] [activemq-artemis] clebertsuconic commented on pull request #3592: ARTEMIS-3311 - ensure visibility of error state on operation context …

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on pull request #3592:
URL: https://github.com/apache/activemq-artemis/pull/3592#issuecomment-846266679


   did you run a whole test suite.. if you did it LGTM


-- 
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:
users@infra.apache.org



[GitHub] [activemq-artemis] gtully commented on pull request #3592: ARTEMIS-3311 - ensure visibility of error state on operation context …

Posted by GitBox <gi...@apache.org>.
gtully commented on pull request #3592:
URL: https://github.com/apache/activemq-artemis/pull/3592#issuecomment-847107856


   yep. full tests look good.


-- 
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:
users@infra.apache.org



[GitHub] [activemq-artemis] gtully commented on pull request #3592: ARTEMIS-3311 - ensure visibility of error state on operation context …

Posted by GitBox <gi...@apache.org>.
gtully commented on pull request #3592:
URL: https://github.com/apache/activemq-artemis/pull/3592#issuecomment-845452491


   the diff looks awful, but with white space ignored it is more trivial:
   ```
   git show -w
   commit 821f64c224a38050d7bbb5137cdc92048358c605 (HEAD -> main, gtully/ARTEMIS-3311)
   Author: gtully <ga...@gmail.com>
   Date:   Thu May 20 21:03:01 2021 +0100
   
       ARTEMIS-3311 - ensure visibility of error state on operation context callback registration, fix and test
   
   diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java
   index 37ef1c06d1..626f467750 100644
   --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java
   +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java
   @@ -130,14 +130,10 @@ public class OperationContextImpl implements OperationContext {
    
       @Override
       public void executeOnCompletion(final IOCallback completion, final boolean storeOnly) {
   -      if (errorCode != -1) {
   -         completion.onError(errorCode, errorMessage);
   -         return;
   -      }
   -
          boolean executeNow = false;
    
          synchronized (this) {
   +         if (errorCode == -1) {
                final int UNDEFINED = Integer.MIN_VALUE;
                int storeLined = UNDEFINED;
                int pageLined = UNDEFINED;
   @@ -184,9 +180,12 @@ public class OperationContextImpl implements OperationContext {
                   }
                }
             }
   +      }
    
   -      if (executeNow) {
          // Executing outside of any locks
   +      if (errorCode != -1) {
   +         completion.onError(errorCode, errorMessage);
   +      } else if (executeNow) {
             completion.done();
          }
    
   ```


-- 
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:
users@infra.apache.org