This is an automated email from the ASF dual-hosted git repository.

zstan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new cd7f2e44155 IGNITE-25470 AI3. Remove useless system properties related 
to logging (#6298)
cd7f2e44155 is described below

commit cd7f2e4415561e36a29d84ad9e180f394ec65687
Author: Max Zhuravkov <[email protected]>
AuthorDate: Wed Jul 23 13:42:37 2025 +0300

    IGNITE-25470 AI3. Remove useless system properties related to logging 
(#6298)
---
 .../internal/lang/IgniteSystemProperties.java      | 28 ----------------------
 .../internal/tostring/IgniteToStringBuilder.java   | 17 +++----------
 .../tostring/StringBuilderLimitedLength.java       |  5 +---
 .../tostring/IgniteToStringBuilderSelfTest.java    | 11 ++++-----
 4 files changed, 8 insertions(+), 53 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/lang/IgniteSystemProperties.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/lang/IgniteSystemProperties.java
index b930591aa3c..7f7a11ceade 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/lang/IgniteSystemProperties.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/lang/IgniteSystemProperties.java
@@ -40,34 +40,6 @@ public final class IgniteSystemProperties {
      */
     public static final String IGNITE_SENSITIVE_DATA_LOGGING = 
"IGNITE_SENSITIVE_DATA_LOGGING";
 
-    /**
-     * Limit collection (map, array) elements number to output.
-     *
-     * <p>Default: 100
-     *
-     * @see IgniteToStringBuilder
-     */
-    public static final String IGNITE_TO_STRING_COLLECTION_LIMIT = 
"IGNITE_TO_STRING_COLLECTION_LIMIT";
-
-    /**
-     * Boolean flag indicating whether {@link IgniteToStringBuilder} should 
ignore {@link RuntimeException} when building string
-     * representation of an object and just print information about exception 
into the log or rethrow.
-     *
-     * <p>Default: {@code True}.
-     *
-     * @see IgniteToStringBuilder
-     */
-    public static final String IGNITE_TO_STRING_IGNORE_RUNTIME_EXCEPTION = 
"IGNITE_TO_STRING_IGNORE_RUNTIME_EXCEPTION";
-
-    /**
-     * Maximum length for {@code IgniteToStringBuilder.toString(...)} methods 
result.
-     *
-     * <p>Default: 10_000.
-     *
-     * @see IgniteToStringBuilder
-     */
-    public static final String IGNITE_TO_STRING_MAX_LENGTH = 
"IGNITE_TO_STRING_MAX_LENGTH";
-
     /** Name of the property controlling whether thread assertions are 
enabled. */
     public static final String THREAD_ASSERTIONS_ENABLED = 
"IGNITE_THREAD_ASSERTIONS_ENABLED";
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/tostring/IgniteToStringBuilder.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/tostring/IgniteToStringBuilder.java
index 403f9aff847..29760d7e47d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/tostring/IgniteToStringBuilder.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/tostring/IgniteToStringBuilder.java
@@ -19,10 +19,6 @@ package org.apache.ignite.internal.tostring;
 
 import static java.util.Objects.nonNull;
 import static 
org.apache.ignite.internal.lang.IgniteSystemProperties.IGNITE_SENSITIVE_DATA_LOGGING;
-import static 
org.apache.ignite.internal.lang.IgniteSystemProperties.IGNITE_TO_STRING_COLLECTION_LIMIT;
-import static 
org.apache.ignite.internal.lang.IgniteSystemProperties.IGNITE_TO_STRING_IGNORE_RUNTIME_EXCEPTION;
-import static 
org.apache.ignite.internal.lang.IgniteSystemProperties.getBoolean;
-import static 
org.apache.ignite.internal.lang.IgniteSystemProperties.getInteger;
 import static org.apache.ignite.internal.lang.IgniteSystemProperties.getString;
 
 import java.io.Externalizable;
@@ -91,10 +87,7 @@ public class IgniteToStringBuilder {
     private static final Object[] EMPTY_ARRAY = new Object[0];
 
     /** Max collection elements to be written. */
-    private static final int COLLECTION_LIMIT = 
getInteger(IGNITE_TO_STRING_COLLECTION_LIMIT, 100);
-
-    /** Ignore flag for runtime exceptions while building string. */
-    private static final boolean IGNORE_RUNTIME_EXCEPTION = 
!getBoolean(IGNITE_TO_STRING_IGNORE_RUNTIME_EXCEPTION, false);
+    private static final int COLLECTION_LIMIT = 100;
 
     /** Supplier for {@link #includeSensitive} with default behavior. */
     private static final AtomicReference<Supplier<SensitiveDataLoggingPolicy>> 
SENS_DATA_LOG_SUP_REF =
@@ -1813,12 +1806,8 @@ public class IgniteToStringBuilder {
                             try {
                                 toString(buf, fd.fieldClass(), fieldValue);
                             } catch (RuntimeException e) {
-                                if (IGNORE_RUNTIME_EXCEPTION) {
-                                    buf.app("Runtime exception was caught when 
building string representation: "
-                                            + e.getMessage());
-                                } else {
-                                    throw e;
-                                }
+                                buf.app("Runtime exception was caught when 
building string representation: "
+                                        + e.getMessage());
                             }
 
                             break;
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/tostring/StringBuilderLimitedLength.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/tostring/StringBuilderLimitedLength.java
index 64e316381d9..5767de315ff 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/tostring/StringBuilderLimitedLength.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/tostring/StringBuilderLimitedLength.java
@@ -17,11 +17,8 @@
 
 package org.apache.ignite.internal.tostring;
 
-import static 
org.apache.ignite.internal.lang.IgniteSystemProperties.IGNITE_TO_STRING_MAX_LENGTH;
-
 import java.util.Arrays;
 import org.apache.ignite.internal.lang.IgniteStringBuilder;
-import org.apache.ignite.internal.lang.IgniteSystemProperties;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -31,7 +28,7 @@ import org.jetbrains.annotations.Nullable;
  */
 class StringBuilderLimitedLength extends IgniteStringBuilder {
     /** Max string length. */
-    private static final int MAX_STR_LEN = 
IgniteSystemProperties.getInteger(IGNITE_TO_STRING_MAX_LENGTH, 10_000);
+    private static final int MAX_STR_LEN = 10_000;
 
     /** Length of tail part of message. */
     private static final int TAIL_LEN = MAX_STR_LEN / 10 * 2;
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/tostring/IgniteToStringBuilderSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/tostring/IgniteToStringBuilderSelfTest.java
index 8f8b4af6aa1..961791600e1 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/tostring/IgniteToStringBuilderSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/tostring/IgniteToStringBuilderSelfTest.java
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.internal.tostring;
 
-import static 
org.apache.ignite.internal.lang.IgniteSystemProperties.IGNITE_TO_STRING_COLLECTION_LIMIT;
-import static 
org.apache.ignite.internal.lang.IgniteSystemProperties.IGNITE_TO_STRING_MAX_LENGTH;
 import static 
org.apache.ignite.internal.tostring.IgniteToStringBuilder.identity;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.containsString;
@@ -48,7 +46,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.ReadWriteLock;
 import org.apache.ignite.internal.lang.IgniteInternalException;
-import org.apache.ignite.internal.lang.IgniteSystemProperties;
 import org.apache.ignite.internal.testframework.IgniteAbstractTest;
 import org.apache.ignite.internal.util.IgniteUtils;
 import org.junit.jupiter.api.Test;
@@ -238,7 +235,7 @@ public class IgniteToStringBuilderSelfTest extends 
IgniteAbstractTest {
     @Test
     @SuppressWarnings({"rawtypes", "unchecked"})
     public void testArrLimitWithRecursion() {
-        int limit = 
IgniteSystemProperties.getInteger(IGNITE_TO_STRING_COLLECTION_LIMIT, 100);
+        int limit = 100;
 
         ArrayList[] arrOf = new ArrayList[limit + 1];
         Arrays.fill(arrOf, new ArrayList());
@@ -267,7 +264,7 @@ public class IgniteToStringBuilderSelfTest extends 
IgniteAbstractTest {
 
     @Test
     public void testToStringCollectionLimits() {
-        int limit = 
IgniteSystemProperties.getInteger(IGNITE_TO_STRING_COLLECTION_LIMIT, 100);
+        int limit = 100;
 
         Object[] vals = new Object[]{
                 Byte.MIN_VALUE, Boolean.TRUE, Short.MIN_VALUE, 
Integer.MIN_VALUE, Long.MIN_VALUE,
@@ -374,7 +371,7 @@ public class IgniteToStringBuilderSelfTest extends 
IgniteAbstractTest {
     @Test
     @SuppressWarnings({"rawtypes", "unchecked"})
     public void testToStringColAndMapLimitWithRecursion() {
-        int limit = 
IgniteSystemProperties.getInteger(IGNITE_TO_STRING_COLLECTION_LIMIT, 100);
+        int limit = 100;
         Map strMap = new TreeMap<>();
         List strList = new ArrayList<>(limit + 1);
 
@@ -420,7 +417,7 @@ public class IgniteToStringBuilderSelfTest extends 
IgniteAbstractTest {
 
     @Test
     public void testToStringSizeLimits() {
-        int limit = 
IgniteSystemProperties.getInteger(IGNITE_TO_STRING_MAX_LENGTH, 10_000);
+        int limit = 10_000;
         final int tailLen = limit / 10 * 2;
 
         StringBuilder sb = new StringBuilder(limit + 10);

Reply via email to