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 2022/02/14 12:08:02 UTC

[GitHub] [ignite] Sega76 opened a new pull request #9824: IGNITE-13389: Append additional settings to obtain full stack trace on thin client side if an error occurs on server side.

Sega76 opened a new pull request #9824:
URL: https://github.com/apache/ignite/pull/9824


   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.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ptupitsyn commented on a change in pull request #9824: IGNITE-13389: Append additional settings to obtain full stack trace on thin client side if an error occurs on server side.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
##########
@@ -6438,7 +6438,14 @@ else if (newSysTtl == CU.TTL_ZERO) {
                 CacheLazyEntry<Object, Object> interceptEntry =
                     new CacheLazyEntry<>(cctx, entry.key, null, oldVal, null, keepBinary);
 
-                Object interceptorVal = cctx.config().getInterceptor().onBeforePut(interceptEntry, updated0);
+                Object interceptorVal = null;
+
+                try {

Review comment:
       Same question as in #8195 - do we really need this change here? If yes, can we add a corresponding test?

##########
File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientSecurityPermissionsTest.cs
##########
@@ -86,7 +86,7 @@ public void TestDataStreamerNoPermissionThrowsSecurityViolationClientException([
                 var clientEx = (IgniteClientException)ex.GetBaseException();
 
                 Assert.AreEqual(ClientStatusCode.SecurityViolation, clientEx.StatusCode);
-                Assert.AreEqual("Client is not authorized to perform this operation", clientEx.Message);
+                Assert.IsTrue(clientEx.Message.StartsWith("Client is not authorized to perform this operation"));

Review comment:
       We should not include the stack trace by default, error messages should not change as a result of this PR.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] Sega76 commented on a change in pull request #9824: IGNITE-13389: Append additional settings to obtain full stack trace on thin client side if an error occurs on server side.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/DistributedThinClientConfiguration.java
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.configuration;

Review comment:
       moved it to org.apache.ignite.internal.processors.configuration.distributed

##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java
##########
@@ -97,6 +101,20 @@ public ThinClientConfiguration setMaxActiveComputeTasksPerConnection(int maxActi
         return this;
     }
 
+    /**
+     * @return If {@code true} sends full stack into client side.
+     */
+    public boolean showFullStackOnClientSide() {
+        return showFullStack;
+    }
+
+    /**
+     * @param showFullStack If {@code true} sends full stack into client side.
+     */
+    public void showFullStackOnClientSide(boolean showFullStack) {

Review comment:
       done

##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java
##########
@@ -97,6 +101,20 @@ public ThinClientConfiguration setMaxActiveComputeTasksPerConnection(int maxActi
         return this;
     }
 
+    /**
+     * @return If {@code true} sends full stack into client side.
+     */
+    public boolean showFullStackOnClientSide() {

Review comment:
       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.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] Sega76 commented on a change in pull request #9824: IGNITE-13389: Append additional settings to obtain full stack trace on thin client side if an error occurs on server side.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
##########
@@ -6438,7 +6438,14 @@ else if (newSysTtl == CU.TTL_ZERO) {
                 CacheLazyEntry<Object, Object> interceptEntry =
                     new CacheLazyEntry<>(cctx, entry.key, null, oldVal, null, keepBinary);
 
-                Object interceptorVal = cctx.config().getInterceptor().onBeforePut(interceptEntry, updated0);
+                Object interceptorVal = null;
+
+                try {

Review comment:
       I think yes, without this change the thin client can make a failed server node.
   IgniteBinaryTest#testBinaryWithNotGenericInterceptor checked it.
   

##########
File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientSecurityPermissionsTest.cs
##########
@@ -86,7 +86,7 @@ public void TestDataStreamerNoPermissionThrowsSecurityViolationClientException([
                 var clientEx = (IgniteClientException)ex.GetBaseException();
 
                 Assert.AreEqual(ClientStatusCode.SecurityViolation, clientEx.StatusCode);
-                Assert.AreEqual("Client is not authorized to perform this operation", clientEx.Message);
+                Assert.IsTrue(clientEx.Message.StartsWith("Client is not authorized to perform this operation"));

Review comment:
       fixed




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] Sega76 commented on a change in pull request #9824: IGNITE-13389: Append additional settings to obtain full stack trace on thin client side if an error occurs on server side.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/DistributedThinClientConfiguration.java
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.configuration;

Review comment:
       moved it to org.apache.ignite.internal.processors.configuration.distributed

##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java
##########
@@ -97,6 +101,20 @@ public ThinClientConfiguration setMaxActiveComputeTasksPerConnection(int maxActi
         return this;
     }
 
+    /**
+     * @return If {@code true} sends full stack into client side.
+     */
+    public boolean showFullStackOnClientSide() {
+        return showFullStack;
+    }
+
+    /**
+     * @param showFullStack If {@code true} sends full stack into client side.
+     */
+    public void showFullStackOnClientSide(boolean showFullStack) {

Review comment:
       done

##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java
##########
@@ -97,6 +101,20 @@ public ThinClientConfiguration setMaxActiveComputeTasksPerConnection(int maxActi
         return this;
     }
 
+    /**
+     * @return If {@code true} sends full stack into client side.
+     */
+    public boolean showFullStackOnClientSide() {

Review comment:
       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.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ptupitsyn commented on a change in pull request #9824: IGNITE-13389: Append additional settings to obtain full stack trace on thin client side if an error occurs on server side.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java
##########
@@ -97,6 +101,20 @@ public ThinClientConfiguration setMaxActiveComputeTasksPerConnection(int maxActi
         return this;
     }
 
+    /**
+     * @return If {@code true} sends full stack into client side.
+     */
+    public boolean showFullStackOnClientSide() {
+        return showFullStack;
+    }
+
+    /**
+     * @param showFullStack If {@code true} sends full stack into client side.
+     */
+    public void showFullStackOnClientSide(boolean showFullStack) {

Review comment:
       ```suggestion
       public void sendServerExceptionStackTraceToClient(boolean showFullStack) {
   ```

##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java
##########
@@ -97,6 +101,20 @@ public ThinClientConfiguration setMaxActiveComputeTasksPerConnection(int maxActi
         return this;
     }
 
+    /**
+     * @return If {@code true} sends full stack into client side.
+     */
+    public boolean showFullStackOnClientSide() {

Review comment:
       ```suggestion
       public boolean sendServerExceptionStackTraceToClient() {
   ```

##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/DistributedThinClientConfiguration.java
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.configuration;

Review comment:
       I think this class should not be in a public package. It is not intended to be used from user code.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ptupitsyn merged pull request #9824: IGNITE-13389 Thin client: optionally append server exception stack trace to error message

Posted by GitBox <gi...@apache.org>.
ptupitsyn merged pull request #9824:
URL: https://github.com/apache/ignite/pull/9824


   


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ptupitsyn commented on a change in pull request #9824: IGNITE-13389: Append additional settings to obtain full stack trace on thin client side if an error occurs on server side.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
##########
@@ -6438,7 +6438,14 @@ else if (newSysTtl == CU.TTL_ZERO) {
                 CacheLazyEntry<Object, Object> interceptEntry =
                     new CacheLazyEntry<>(cctx, entry.key, null, oldVal, null, keepBinary);
 
-                Object interceptorVal = cctx.config().getInterceptor().onBeforePut(interceptEntry, updated0);
+                Object interceptorVal = null;
+
+                try {

Review comment:
       Same question as in #8195 - do we really need this change here? If yes, can we add a corresponding test?

##########
File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientSecurityPermissionsTest.cs
##########
@@ -86,7 +86,7 @@ public void TestDataStreamerNoPermissionThrowsSecurityViolationClientException([
                 var clientEx = (IgniteClientException)ex.GetBaseException();
 
                 Assert.AreEqual(ClientStatusCode.SecurityViolation, clientEx.StatusCode);
-                Assert.AreEqual("Client is not authorized to perform this operation", clientEx.Message);
+                Assert.IsTrue(clientEx.Message.StartsWith("Client is not authorized to perform this operation"));

Review comment:
       We should not include the stack trace by default, error messages should not change as a result of this PR.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org