You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/12/07 06:33:35 UTC

[GitHub] [ignite] pvinokurov opened a new pull request #8547: IGNITE-13507 NullPointerException on tx recovery

pvinokurov opened a new pull request #8547:
URL: https://github.com/apache/ignite/pull/8547


   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


----------------------------------------------------------------
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] [ignite] pvinokurov commented on a change in pull request #8547: IGNITE-13507 NullPointerException on tx recovery

Posted by GitBox <gi...@apache.org>.
pvinokurov commented on a change in pull request #8547:
URL: https://github.com/apache/ignite/pull/8547#discussion_r548436523



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
##########
@@ -3353,9 +3353,14 @@ else if (tx.setRollbackOnly())
          * @return True if message required, false otherwise.
          */
         private boolean isMvccRecoveryMessageRequired() {
-            return node.isClient() && mvccCrd != null && mvccCrd.nodeId() != null &&
+            ClusterNode mvccCrdNode = null;
+
+            if (mvccCrd != null && mvccCrd.nodeId() != null)
+                mvccCrdNode = cctx.node(mvccCrd.nodeId());
+
+            return node.isClient() && mvccCrdNode != null &&
                 (cctx.kernalContext().coordinators().mvccEnabled() ||
-                    !IgniteFeatures.nodeSupports(cctx.node(mvccCrd.nodeId()), IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));
+                    !IgniteFeatures.nodeSupports(mvccCrdNode, IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));

Review comment:
       Using IgniteFeatures was removed. It looks like nothing is broken




----------------------------------------------------------------
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] [ignite] alamar commented on a change in pull request #8547: IGNITE-13507 NullPointerException on tx recovery

Posted by GitBox <gi...@apache.org>.
alamar commented on a change in pull request #8547:
URL: https://github.com/apache/ignite/pull/8547#discussion_r544946436



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
##########
@@ -3353,9 +3353,14 @@ else if (tx.setRollbackOnly())
          * @return True if message required, false otherwise.
          */
         private boolean isMvccRecoveryMessageRequired() {
-            return node.isClient() && mvccCrd != null && mvccCrd.nodeId() != null &&
+            ClusterNode mvccCrdNode = null;
+
+            if (mvccCrd != null && mvccCrd.nodeId() != null)
+                mvccCrdNode = cctx.node(mvccCrd.nodeId());
+
+            return node.isClient() && mvccCrdNode != null &&
                 (cctx.kernalContext().coordinators().mvccEnabled() ||
-                    !IgniteFeatures.nodeSupports(cctx.node(mvccCrd.nodeId()), IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));
+                    !IgniteFeatures.nodeSupports(mvccCrdNode, IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));

Review comment:
       Please try to remove IgniteFeatures use, see if nothing is broken.




----------------------------------------------------------------
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] [ignite] asfgit closed pull request #8547: IGNITE-13507 NullPointerException on tx recovery

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #8547:
URL: https://github.com/apache/ignite/pull/8547


   


----------------------------------------------------------------
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] [ignite] alamar commented on a change in pull request #8547: IGNITE-13507 NullPointerException on tx recovery

Posted by GitBox <gi...@apache.org>.
alamar commented on a change in pull request #8547:
URL: https://github.com/apache/ignite/pull/8547#discussion_r544134538



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
##########
@@ -3353,9 +3353,14 @@ else if (tx.setRollbackOnly())
          * @return True if message required, false otherwise.
          */
         private boolean isMvccRecoveryMessageRequired() {
-            return node.isClient() && mvccCrd != null && mvccCrd.nodeId() != null &&
+            ClusterNode mvccCrdNode = null;
+
+            if (mvccCrd != null && mvccCrd.nodeId() != null)
+                mvccCrdNode = cctx.node(mvccCrd.nodeId());
+
+            return node.isClient() && mvccCrdNode != null &&
                 (cctx.kernalContext().coordinators().mvccEnabled() ||
-                    !IgniteFeatures.nodeSupports(cctx.node(mvccCrd.nodeId()), IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));
+                    !IgniteFeatures.nodeSupports(mvccCrdNode, IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));

Review comment:
       Please remind me why do we need this at all? Apache Ignite does not have compatibility between versions.
   
   Can we get rid of feature check entirely, assume it as "always true"?




----------------------------------------------------------------
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] [ignite] pvinokurov commented on a change in pull request #8547: IGNITE-13507 NullPointerException on tx recovery

Posted by GitBox <gi...@apache.org>.
pvinokurov commented on a change in pull request #8547:
URL: https://github.com/apache/ignite/pull/8547#discussion_r548443019



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
##########
@@ -3353,9 +3353,14 @@ else if (tx.setRollbackOnly())
          * @return True if message required, false otherwise.
          */
         private boolean isMvccRecoveryMessageRequired() {
-            return node.isClient() && mvccCrd != null && mvccCrd.nodeId() != null &&
+            ClusterNode mvccCrdNode = null;
+
+            if (mvccCrd != null && mvccCrd.nodeId() != null)
+                mvccCrdNode = cctx.node(mvccCrd.nodeId());
+
+            return node.isClient() && mvccCrdNode != null &&
                 (cctx.kernalContext().coordinators().mvccEnabled() ||
-                    !IgniteFeatures.nodeSupports(cctx.node(mvccCrd.nodeId()), IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));
+                    !IgniteFeatures.nodeSupports(mvccCrdNode, IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));

Review comment:
       Also, I changed the name of the test method




----------------------------------------------------------------
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] [ignite] pvinokurov commented on a change in pull request #8547: IGNITE-13507 NullPointerException on tx recovery

Posted by GitBox <gi...@apache.org>.
pvinokurov commented on a change in pull request #8547:
URL: https://github.com/apache/ignite/pull/8547#discussion_r544791554



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
##########
@@ -3353,9 +3353,14 @@ else if (tx.setRollbackOnly())
          * @return True if message required, false otherwise.
          */
         private boolean isMvccRecoveryMessageRequired() {
-            return node.isClient() && mvccCrd != null && mvccCrd.nodeId() != null &&
+            ClusterNode mvccCrdNode = null;
+
+            if (mvccCrd != null && mvccCrd.nodeId() != null)
+                mvccCrdNode = cctx.node(mvccCrd.nodeId());
+
+            return node.isClient() && mvccCrdNode != null &&
                 (cctx.kernalContext().coordinators().mvccEnabled() ||
-                    !IgniteFeatures.nodeSupports(cctx.node(mvccCrd.nodeId()), IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));
+                    !IgniteFeatures.nodeSupports(mvccCrdNode, IgniteFeatures.MVCC_TX_RECOVERY_PROTOCOL_V2));

Review comment:
       I am not sure that it is related to comatibility. It was introduced as an optimization within fixes for https://issues.apache.org/jira/browse/IGNITE-12350




----------------------------------------------------------------
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