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/09/01 09:44:37 UTC

[GitHub] [ignite] vldpyatkov commented on a change in pull request #8195: IGNITE-13389

vldpyatkov commented on a change in pull request #8195:
URL: https://github.com/apache/ignite/pull/8195#discussion_r481002743



##########
File path: modules/core/src/test/java/org/apache/ignite/client/IgniteBinaryTest.java
##########
@@ -21,27 +21,36 @@
 import java.util.Collection;
 import java.util.Map;
 import java.util.stream.Collectors;
+import javax.cache.Cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteBinary;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.binary.BinaryObjectBuilder;
 import org.apache.ignite.binary.BinaryType;
+import org.apache.ignite.cache.CacheInterceptorAdapter;
 import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.ClientConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.processors.odbc.ClientListenerProcessor;
+import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.mxbean.ClientProcessorMXBean;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.ListeningTestLogger;
+import org.apache.ignite.testframework.LogListener;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.Timeout;
 
 import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
 
 /**
  * Ignite {@link BinaryObject} API system tests.
  */
-public class IgniteBinaryTest {
+public class IgniteBinaryTest extends GridCommonAbstractTest {
     /** Per test timeout */
     @Rule
     public Timeout globalTimeout = new Timeout((int) GridTestUtils.DFLT_TEST_TIMEOUT);

Review comment:
       If you extend GridCommonAbstractTest, which means a timeout already defined.
   It does not need to use another @Rule for this.

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerProcessor.java
##########
@@ -646,5 +650,19 @@ private static boolean isNotDefault(ClientConnectorConfiguration cliConnCfg) {
 
             return false;
         }
+
+        /** {@inheritDoc} */
+        @Override public void showFullStack(boolean show) {
+            IgniteCompute compute = ctx.grid().compute(ctx.grid().cluster().forServers());
+
+            compute.broadcast(new CA() {

Review comment:
       Sending of non-static class over the network leads to serialization of a parent class.
   Please, make it static.

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientRequestHandler.java
##########
@@ -115,7 +116,14 @@
         int status = e instanceof IgniteClientException ?
             ((IgniteClientException)e).statusCode() : ClientStatus.FAILED;
 
-        return new ClientResponse(req.requestId(), status, e.getMessage());
+        boolean fullStack = false;
+
+        if (X.getCause(e) != null || !X.getSuppressedList(e).isEmpty()) {
+            fullStack =
+                ctx.kernalContext().config().getClientConnectorConfiguration().getThinClientConfiguration().showFullStack();

Review comment:
       Why don't you want to do this in constructor?
   I see you use static configuration as a dynamic, but I think it doesn't right too.

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
##########
@@ -6411,7 +6411,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 {
+                    interceptorVal = cctx.config().getInterceptor().onBeforePut(interceptEntry, updated0);

Review comment:
       How this change connected with the ticket?

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientRequestHandler.java
##########
@@ -115,7 +116,14 @@
         int status = e instanceof IgniteClientException ?
             ((IgniteClientException)e).statusCode() : ClientStatus.FAILED;
 
-        return new ClientResponse(req.requestId(), status, e.getMessage());
+        boolean fullStack = false;
+
+        if (X.getCause(e) != null || !X.getSuppressedList(e).isEmpty()) {

Review comment:
       This is a suspicion condition, may we shall print stack always.




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