[ignite-3] branch main updated: IGNITE-17293 Fix Netty buffer leak in MarshallableTest (#917)

2022-07-01 Thread sdanilov
This is an automated email from the ASF dual-hosted git repository.

sdanilov 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 cf48a1be6 IGNITE-17293 Fix Netty buffer leak in MarshallableTest (#917)
cf48a1be6 is described below

commit cf48a1be682c1d5e7cdefd9a8b8f952abdf0914c
Author: Roman Puchkovskiy 
AuthorDate: Fri Jul 1 19:36:22 2022 +0400

IGNITE-17293 Fix Netty buffer leak in MarshallableTest (#917)
---
 .../network/serialization/MarshallableTest.java| 22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git 
a/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/MarshallableTest.java
 
b/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/MarshallableTest.java
index aa96f824e..fe8bfa5d9 100644
--- 
a/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/MarshallableTest.java
+++ 
b/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/MarshallableTest.java
@@ -147,21 +147,25 @@ public class MarshallableTest {
 
 outBuffer.flip();
 
-ByteBuf inBuffer = allocator.buffer();
-
 // List that holds decoded object
 final var list = new ArrayList<>();
 
-for (int i = 0; i < size; i++) {
-// Write bytes to a decoding buffer one by one
-inBuffer.writeByte(outBuffer.get());
+ByteBuf inBuffer = allocator.buffer();
+
+try {
+for (int i = 0; i < size; i++) {
+// Write bytes to a decoding buffer one by one
+inBuffer.writeByte(outBuffer.get());
 
-decoder.decode(ctx, inBuffer, list);
+decoder.decode(ctx, inBuffer, list);
 
-if (i < size - 1) {
-// Any time before the buffer is fully read, message object 
should not be decoded
-assertThat(list, is(empty()));
+if (i < size - 1) {
+// Any time before the buffer is fully read, message 
object should not be decoded
+assertThat(list, is(empty()));
+}
 }
+} finally {
+inBuffer.release();
 }
 
 // Buffer is fully read, message object should be decoded



[ignite] branch master updated: IGNITE-17277 Added a user info to the sql queries view (#10124)

2022-07-01 Thread namelchev
This is an automated email from the ASF dual-hosted git repository.

namelchev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 8d02951c005 IGNITE-17277 Added a user info to the sql queries view 
(#10124)
8d02951c005 is described below

commit 8d02951c005b4fad319a99b49c09521f8abe9c96
Author: Nikita Amelchev 
AuthorDate: Fri Jul 1 18:10:00 2022 +0300

IGNITE-17277 Added a user info to the sql queries view (#10124)
---
 docs/_docs/monitoring-metrics/system-views.adoc| 16 +++--
 .../ignite/jdbc/thin/JdbcThinMetadataSelfTest.java |  2 +-
 .../systemview/walker/SqlQueryViewWalker.java  |  4 +-
 .../processors/query/GridRunningQueryInfo.java | 13 +++-
 .../processors/query/RunningQueryManager.java  |  4 +-
 .../ignite/spi/systemview/view/SqlQueryView.java   |  6 ++
 .../processors/query/SqlSystemViewsSelfTest.java   |  5 +-
 .../systemview/SystemViewSecurityTest.java | 77 ++
 .../testsuites/IgniteStatisticsTestSuite.java  |  4 +-
 9 files changed, 117 insertions(+), 14 deletions(-)

diff --git a/docs/_docs/monitoring-metrics/system-views.adoc 
b/docs/_docs/monitoring-metrics/system-views.adoc
index 96d9cba182f..fd7b1cfa2f2 100644
--- a/docs/_docs/monitoring-metrics/system-views.adoc
+++ b/docs/_docs/monitoring-metrics/system-views.adoc
@@ -464,14 +464,16 @@ This view exposes information about currently running SQL 
queries.
 
 [{table_opts}]
 |===
-|NAME | TYPE |DESCRIPTION
-|DURATION | long |Query execution duration
+|NAME | TYPE | DESCRIPTION
+|QUERY_ID | UUID | Query ID
+|SQL | string | Query text
+|ORIGIN_NODE_ID | UUID | Node that started query
+|START_TIME | date | Query start time
+|DURATION | long | Query execution duration
+|INITIATOR_ID | string | User defined query initiator ID
 |LOCAL | boolean | True if local only
-|ORIGIN_NODE_ID | UUID |Node that started query
-|QUERY_ID | UUID |Query ID
-|SCHEMA_NAME | string |  Schema name
-|SQL | string |  Query text
-|START_TIME | date |Query start time
+|SCHEMA_NAME | string | Schema name
+|SUBJECT_ID | UUID | The subject ID of the entity that initiated the query
 |===
 
 == SQL_QUERIES_HISTORY
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
index 90519c44fcf..c9cf9bd225e 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
@@ -38,7 +38,6 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
-
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
@@ -775,6 +774,7 @@ public class JdbcThinMetadataSelfTest extends 
JdbcThinAbstractSelfTest {
 "SYS.SQL_QUERIES.DURATION.null.19",
 "SYS.SQL_QUERIES.ORIGIN_NODE_ID.null.2147483647",
 "SYS.SQL_QUERIES.INITIATOR_ID.null.2147483647",
+"SYS.SQL_QUERIES.SUBJECT_ID.null.2147483647",
 "SYS.SCAN_QUERIES.START_TIME.null.19",
 "SYS.SCAN_QUERIES.TRANSFORMER.null.2147483647",
 "SYS.SCAN_QUERIES.LOCAL.null.1",
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryViewWalker.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryViewWalker.java
index 1bfa4d96d36..216645608e1 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryViewWalker.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryViewWalker.java
@@ -39,6 +39,7 @@ public class SqlQueryViewWalker implements 
SystemViewRowAttributeWalkerhttp://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.internal.systemview;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.cache.query.SqlFieldsQuery;
+import org.apache.ignite.client.Config;
+import org.apache.ignite.client.IgniteClient;
+import org.apache.ignite.configuration.ClientConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.processors.security.AbstractSecurityTest;
+import org.apache.ignite.spi.systemview.view.SqlQueryView;
+import org.apache.ignite.spi.systemview.view.SystemVi

[ignite] branch master updated: IGNITE-17288 Fix broken links in Javadocs (#10129)

2022-07-01 Thread ptupitsyn
This is an automated email from the ASF dual-hosted git repository.

ptupitsyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new d84d4451385 IGNITE-17288 Fix broken links in Javadocs (#10129)
d84d4451385 is described below

commit d84d4451385b4cbcd6feb44726ee9c2b8d18b9a1
Author: IgGusev 
AuthorDate: Fri Jul 1 18:20:06 2022 +0400

IGNITE-17288 Fix broken links in Javadocs (#10129)
---
 modules/core/src/main/java/org/apache/ignite/IgniteLogger.java  | 2 +-
 .../ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java 
b/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
index 412e4141a9c..583e84839d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.Nullable;
  * This interface defines basic logging functionality used throughout the 
system. We had to
  * abstract it out so that we can use whatever logging is used by the hosting 
environment.
  * Currently, http://logging.apache.org/log4j/1.2/";>log4j,
- * http://docs.jboss.org/hibernate/orm/4.3/topical/html/logging/Logging";>JBoss,
+ * https://docs.jboss.org/hibernate/orm/5.4/topical/html_single/logging/Logging.html";>JBoss,
  * http://jakarta.apache.org/commons/logging/";>JCL and
  * console logging are provided as supported implementations.
  * 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java
index d37a4cbff23..1a7ce8604c8 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java
@@ -70,7 +70,7 @@ import static 
org.apache.ignite.events.EventType.EVT_NODE_LEFT;
  * from slower node and moved to the fast under-utilized node.
  * 
  * The design and ideas for this SPI are significantly influenced by
- * http://gee.cs.oswego.edu/dl/papers/fj.pdf";>Java Fork/Join 
Framework
+ * https://dl.acm.org/doi/pdf/10.1145/337449.337465";>Java Fork/Join 
Framework
  * authored by Doug Lea and planned for Java 7. {@code 
GridJobStealingCollisionSpi} took
  * similar concepts and applied them to the grid (as opposed to within VM 
support planned
  * in Java 7).



[ignite-3] branch ignite-17203 updated (5672b0bb3 -> 438d30cfc)

2022-07-01 Thread amashenkov
This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a change to branch ignite-17203
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


from 5672b0bb3 Styles.
 add 438d30cfc Fix imports.

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/ignite/internal/sql/engine/util/QueryChecker.java  | 3 ---
 1 file changed, 3 deletions(-)



[ignite-3] branch ignite-17203 updated (461eb4b20 -> 5672b0bb3)

2022-07-01 Thread amashenkov
This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a change to branch ignite-17203
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


from 461eb4b20 Fix type conversion.
 add 5672b0bb3 Styles.

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/ignite/internal/sql/engine/util/QueryChecker.java   | 1 -
 .../org/apache/ignite/internal/sql/engine/type/IgniteTypeFactory.java   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)



[ignite-3] branch ignite-17203 updated: Fix type conversion.

2022-07-01 Thread amashenkov
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/ignite-17203 by this push:
 new 461eb4b20 Fix type conversion.
461eb4b20 is described below

commit 461eb4b2048f56efe19c8b1268d83fd0bec755e0
Author: Andrew V. Mashenkov 
AuthorDate: Fri Jul 1 15:18:11 2022 +0300

Fix type conversion.
---
 .../ignite/schema/definition/ColumnType.java   | 38 +++---
 .../ignite/internal/sql/engine/ItMetadataTest.java | 74 ++--
 .../apache/ignite/internal/schema/NativeTypes.java |  6 +-
 .../ignite/internal/schema/TemporalNativeType.java |  3 +-
 .../SchemaConfigurationConverter.java  | 56 ---
 .../ignite/internal/schema/NativeTypeTest.java | 17 +++--
 .../ignite/internal/schema/TemporalTypesTest.java  |  4 +-
 .../sql/engine/exec/ddl/DdlCommandHandler.java |  9 +--
 .../sql/engine/type/IgniteTypeFactory.java | 80 --
 .../internal/sql/engine/type/IgniteTypeSystem.java | 58 +++-
 .../internal/table/MutableRowTupleAdapterTest.java | 14 ++--
 11 files changed, 202 insertions(+), 157 deletions(-)

diff --git 
a/modules/api/src/main/java/org/apache/ignite/schema/definition/ColumnType.java 
b/modules/api/src/main/java/org/apache/ignite/schema/definition/ColumnType.java
index 47b7747fb..13f9d3633 100644
--- 
a/modules/api/src/main/java/org/apache/ignite/schema/definition/ColumnType.java
+++ 
b/modules/api/src/main/java/org/apache/ignite/schema/definition/ColumnType.java
@@ -175,14 +175,14 @@ public class ColumnType {
 
 /**
  * Returns timezone-free type representing a time of day in hours, 
minutes, seconds, and fractional seconds with the default precision
- * of 6 (microseconds).
+ * of 0 (seconds).
  *
  * @return Native type.
- * @see TemporalColumnType#DEFAULT_PRECISION
+ * @see TemporalColumnType#DEFAULT_TIME_PRECISION
  * @see #time(int)
  */
 public static TemporalColumnType time() {
-return new TemporalColumnType(ColumnTypeSpec.TIME, 
TemporalColumnType.DEFAULT_PRECISION);
+return new TemporalColumnType(ColumnTypeSpec.TIME, 
TemporalColumnType.DEFAULT_TIME_PRECISION);
 }
 
 /**
@@ -203,14 +203,14 @@ public class ColumnType {
 }
 
 /**
- * Returns timezone-free datetime encoded as (date, time) with the default 
time precision of 6 (microseconds).
+ * Returns timezone-free datetime encoded as (date, time) with the default 
time precision of 0 (seconds).
  *
  * @return Native type.
- * @see TemporalColumnType#DEFAULT_PRECISION
+ * @see TemporalColumnType#DEFAULT_TIME_PRECISION
  * @see #datetime(int)
  */
 public static TemporalColumnType datetime() {
-return new TemporalColumnType(ColumnTypeSpec.DATETIME, 
TemporalColumnType.DEFAULT_PRECISION);
+return new TemporalColumnType(ColumnTypeSpec.DATETIME, 
TemporalColumnType.DEFAULT_TIME_PRECISION);
 }
 
 /**
@@ -236,11 +236,11 @@ public class ColumnType {
  * (microseconds).
  *
  * @return Native type.
- * @see TemporalColumnType#DEFAULT_PRECISION
+ * @see TemporalColumnType#DEFAULT_TIMESTAMP_PRECISION
  * @see #timestamp(int)
  */
 public static TemporalColumnType timestamp() {
-return new TemporalColumnType(ColumnTypeSpec.TIMESTAMP, 
TemporalColumnType.DEFAULT_PRECISION);
+return new TemporalColumnType(ColumnTypeSpec.TIMESTAMP, 
TemporalColumnType.DEFAULT_TIMESTAMP_PRECISION);
 }
 
 /**
@@ -460,8 +460,26 @@ public class ColumnType {
  * Column type of variable length.
  */
 public static class TemporalColumnType extends ColumnType {
-/** Default temporal type precision: microseconds. */
-public static final int DEFAULT_PRECISION = 6;
+/**
+ * Default TIME type precision: microseconds.
+ *
+ * SQL99 part 2 section 6.1 syntax rule 30
+ */
+public static final int DEFAULT_TIMESTAMP_PRECISION = 6;
+
+/**
+ * Default TIMESTAMP type precision: seconds.
+ *
+ * SQL99 part 2 section 6.1 syntax rule 30
+ */
+public static final int DEFAULT_TIME_PRECISION = 0;
+
+/**
+ * Max TIME precision.
+ *
+ * SQL99 part 2 section 6.1 syntax rule 31
+ */
+public static final int MAX_TIME_PRECISION = 9;
 
 /** Fractional seconds precision. */
 private final int precision;
diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItMetadataTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItMetadataTest.java
index 07d30ca0f..40821f874 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItMetadataTest.java
+++ 
b/modules/runner/src/in

[ignite-3] branch new-marshaller updated (f580edc57 -> 71e2c265d)

2022-07-01 Thread sdanilov
This is an automated email from the ASF dual-hosted git repository.

sdanilov pushed a change to branch new-marshaller
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


 discard f580edc57 New marshaller test
 add bea62dd19 IGNITE-17283 Start nodes in parallel in ItCmgRaftServiceTest 
(#911)
 add 3972ae447 IGNITE-17193 Return application/problem+json in REST. Fixes 
#890
 new 71e2c265d New marshaller test

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f580edc57)
\
 N -- N -- N   refs/heads/new-marshaller (71e2c265d)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../configuration/ItShowConfigurationCallTest.java |   2 +-
 .../ignite/rest/ItGeneratedRestClientTest.java |  67 ---
 .../management/raft/ItCmgRaftServiceTest.java  |  72 +++
 .../rest/ItClusterManagementControllerTest.java|  15 +-
 .../rest/ClusterManagementController.java  |  19 +-
 .../rest/ClusterManagementRestFactory.java |   2 +-
 .../IgniteInternalCheckedExceptionHandler.java}|  25 +--
 .../handler/IgniteInternalExceptionHandler.java|  15 +-
 ...umentClusterInitializationExceptionHandler.java |  15 +-
 .../configuration/validation/ValidationIssue.java  |  16 +-
 .../validation/ExceptKeysValidator.java|   2 +-
 .../validation/ImmutableValidator.java |   1 +
 .../configuration/validation/OneOfValidator.java   |   2 +-
 .../validation/PowerOfTwoValidator.java|   1 +
 .../configuration/validation/RangeValidator.java   |   2 +
 .../configuration/validation/ValidationUtil.java   |   2 +-
 .../AbstractConfigurationController.java   |  11 +-
 .../ClusterConfigurationController.java|  55 --
 .../configuration/NodeConfigurationController.java |  59 --
 .../rest/configuration/PresentationsFactory.java   |   2 +-
 .../exception/ConfigPathUnrecognizedException.java |  27 ---
 .../exception/InvalidConfigFormatException.java|  27 ---
 .../ConfigPathUnrecognizedExceptionHandler.java|  44 -
 .../ConfigurationValidationExceptionHandler.java   |  50 -
 .../InvalidConfigFormatExceptionHandler.java   |  43 -
 .../exception/handler/package-info.java|  23 ---
 .../rest/configuration/exception/package-info.java |  22 ---
 .../configuration/ConfigurationChangerTest.java|   2 +-
 .../ConfigurationPresentationTest.java |   2 +-
 .../validation/ValidationUtilTest.java |  11 +-
 .../ConfigurationControllerBaseTest.java   |  31 +--
 .../internal/rest/configuration/TestFactory.java   |   2 +-
 modules/rest-api/pom.xml   |  50 +
 .../internal/rest/{api => }/RestFactory.java   |   2 +-
 .../ignite/internal/rest/api/ErrorResult.java  |  65 ---
 .../ignite/internal/rest/api/InvalidParam.java}|  42 +++--
 .../apache/ignite/internal/rest/api/Problem.java   | 209 +
 .../internal/rest/api/ValidationProblem.java   | 111 +++
 .../ignite/internal/rest/constants/HttpCode.java}  |  50 ++---
 .../ignite/internal/rest/constants/MediaType.java} |  28 ++-
 .../exception/handler/IgniteExceptionHandler.java  |  72 +++
 .../ignite/internal/rest/problem/Builder.java} |  10 +-
 .../rest/problem/HttpProblemResponse.java} |  35 ++--
 .../handler/IgniteExceptionHandlerTest.java|  91 +
 .../rest/openapi/openapi.properties|   8 +-
 modules/rest/openapi/openapi.yaml  | 121 +++-
 modules/rest/pom.xml   |   4 +-
 .../apache/ignite/internal/rest/RestComponent.java |   1 -
 .../org/apache/ignite/internal/app/IgniteImpl.java |   2 +-
 .../configuration/ColumnTypeValidatorImpl.java |   4 +-
 .../configuration/KnownDataStorageValidator.java   |  12 +-
 .../schema/configuration/TableValidatorImpl.java   |   6 +-
 .../ExistingDataStorageValidator.java  |  14 +-
 .../PageMemoryDataRegionValidatorImpl.java |  21 ++-
 .../RocksDbDataRegionValidatorImpl.java|  12 +-
 55 files changed, 1065 insertions(+), 574 deletions(-)
 rename 
modules/{configuration/src/main/java/org/apache/ignite/internal/rest/configuration/except

[ignite-3] 01/01: New marshaller test

2022-07-01 Thread sdanilov
This is an automated email from the ASF dual-hosted git repository.

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

commit 71e2c265d978beb174d9793b1de911759831df98
Author: Semyon Danilov 
AuthorDate: Fri Jul 1 15:15:27 2022 +0400

New marshaller test
---
 .../ignite/raft/jraft/util/JDKMarshaller.java  | 39 ++
 .../apache/ignite/raft/jraft/util/Marshaller.java  |  2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/JDKMarshaller.java
 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/JDKMarshaller.java
index 1556ddc68..7cb8f1b07 100644
--- 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/JDKMarshaller.java
+++ 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/JDKMarshaller.java
@@ -20,6 +20,12 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import org.apache.ignite.internal.network.serialization.ClassDescriptorFactory;
+import 
org.apache.ignite.internal.network.serialization.ClassDescriptorRegistry;
+import 
org.apache.ignite.internal.network.serialization.marshal.DefaultUserObjectMarshaller;
+import 
org.apache.ignite.internal.network.serialization.marshal.MarshalException;
+import 
org.apache.ignite.internal.network.serialization.marshal.UnmarshalException;
+import 
org.apache.ignite.internal.network.serialization.marshal.UserObjectMarshaller;
 
 /**
  *
@@ -54,4 +60,37 @@ public class JDKMarshaller implements Marshaller {
 throw new Error(e);
 }
 }
+
+/** */
+public static class NewMarshaller implements Marshaller {
+/** */
+private final ClassDescriptorRegistry registry = new 
ClassDescriptorRegistry();
+
+/** */
+private final ClassDescriptorFactory factory = new 
ClassDescriptorFactory(registry);
+
+/** */
+private final UserObjectMarshaller uom = new 
DefaultUserObjectMarshaller(registry, factory);
+
+/** {@inheritDoc} */
+@Override
+public byte[] marshall(Object o) {
+try {
+return uom.marshal(o).bytes();
+} catch (MarshalException e) {
+throw new RuntimeException(e);
+}
+}
+
+/** {@inheritDoc} */
+@Override
+public  T unmarshall(byte[] raw) {
+try {
+return uom.unmarshal(raw, registry);
+}
+catch (UnmarshalException e) {
+throw new RuntimeException(e);
+}
+}
+}
 }
diff --git 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/Marshaller.java 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/Marshaller.java
index b46128b03..d6d42e192 100644
--- 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/Marshaller.java
+++ 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/Marshaller.java
@@ -17,7 +17,7 @@
 package org.apache.ignite.raft.jraft.util;
 
 public interface Marshaller {
-public static Marshaller DEFAULT = new JDKMarshaller();
+public static Marshaller DEFAULT = new JDKMarshaller.NewMarshaller();
 
 byte[] marshall(Object o);
 



[ignite-3] branch new-marshaller created (now f580edc57)

2022-07-01 Thread sdanilov
This is an automated email from the ASF dual-hosted git repository.

sdanilov pushed a change to branch new-marshaller
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


  at f580edc57 New marshaller test

This branch includes the following new commits:

 new f580edc57 New marshaller test

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[ignite-3] 01/01: New marshaller test

2022-07-01 Thread sdanilov
This is an automated email from the ASF dual-hosted git repository.

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

commit f580edc5739790dbb876d32d5005363a90d8cfed
Author: Semyon Danilov 
AuthorDate: Fri Jul 1 15:15:27 2022 +0400

New marshaller test
---
 .../ignite/raft/jraft/util/JDKMarshaller.java  | 39 ++
 .../apache/ignite/raft/jraft/util/Marshaller.java  |  2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/JDKMarshaller.java
 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/JDKMarshaller.java
index 1556ddc68..7cb8f1b07 100644
--- 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/JDKMarshaller.java
+++ 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/JDKMarshaller.java
@@ -20,6 +20,12 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import org.apache.ignite.internal.network.serialization.ClassDescriptorFactory;
+import 
org.apache.ignite.internal.network.serialization.ClassDescriptorRegistry;
+import 
org.apache.ignite.internal.network.serialization.marshal.DefaultUserObjectMarshaller;
+import 
org.apache.ignite.internal.network.serialization.marshal.MarshalException;
+import 
org.apache.ignite.internal.network.serialization.marshal.UnmarshalException;
+import 
org.apache.ignite.internal.network.serialization.marshal.UserObjectMarshaller;
 
 /**
  *
@@ -54,4 +60,37 @@ public class JDKMarshaller implements Marshaller {
 throw new Error(e);
 }
 }
+
+/** */
+public static class NewMarshaller implements Marshaller {
+/** */
+private final ClassDescriptorRegistry registry = new 
ClassDescriptorRegistry();
+
+/** */
+private final ClassDescriptorFactory factory = new 
ClassDescriptorFactory(registry);
+
+/** */
+private final UserObjectMarshaller uom = new 
DefaultUserObjectMarshaller(registry, factory);
+
+/** {@inheritDoc} */
+@Override
+public byte[] marshall(Object o) {
+try {
+return uom.marshal(o).bytes();
+} catch (MarshalException e) {
+throw new RuntimeException(e);
+}
+}
+
+/** {@inheritDoc} */
+@Override
+public  T unmarshall(byte[] raw) {
+try {
+return uom.unmarshal(raw, registry);
+}
+catch (UnmarshalException e) {
+throw new RuntimeException(e);
+}
+}
+}
 }
diff --git 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/Marshaller.java 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/Marshaller.java
index b46128b03..d6d42e192 100644
--- 
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/Marshaller.java
+++ 
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/util/Marshaller.java
@@ -17,7 +17,7 @@
 package org.apache.ignite.raft.jraft.util;
 
 public interface Marshaller {
-public static Marshaller DEFAULT = new JDKMarshaller();
+public static Marshaller DEFAULT = new JDKMarshaller.NewMarshaller();
 
 byte[] marshall(Object o);
 



[ignite-3] branch main updated: IGNITE-17193 Return application/problem+json in REST. Fixes #890

2022-07-01 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 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 3972ae447 IGNITE-17193 Return application/problem+json in REST. Fixes 
#890
3972ae447 is described below

commit 3972ae44711d84accc3abb49c8fc4ecb857e163a
Author: Aleksandr Pakhomov 
AuthorDate: Fri Jul 1 14:01:36 2022 +0300

IGNITE-17193 Return application/problem+json in REST. Fixes #890

Signed-off-by: Slava Koptilin 
---
 .../configuration/ItShowConfigurationCallTest.java |   2 +-
 .../ignite/rest/ItGeneratedRestClientTest.java |  67 ---
 .../rest/ItClusterManagementControllerTest.java|  15 +-
 .../rest/ClusterManagementController.java  |  19 +-
 .../rest/ClusterManagementRestFactory.java |   2 +-
 .../IgniteInternalCheckedExceptionHandler.java}|  25 +--
 .../handler/IgniteInternalExceptionHandler.java|  15 +-
 ...umentClusterInitializationExceptionHandler.java |  15 +-
 .../configuration/validation/ValidationIssue.java  |  16 +-
 .../validation/ExceptKeysValidator.java|   2 +-
 .../validation/ImmutableValidator.java |   1 +
 .../configuration/validation/OneOfValidator.java   |   2 +-
 .../validation/PowerOfTwoValidator.java|   1 +
 .../configuration/validation/RangeValidator.java   |   2 +
 .../configuration/validation/ValidationUtil.java   |   2 +-
 .../AbstractConfigurationController.java   |  11 +-
 .../ClusterConfigurationController.java|  55 --
 .../configuration/NodeConfigurationController.java |  59 --
 .../rest/configuration/PresentationsFactory.java   |   2 +-
 .../exception/ConfigPathUnrecognizedException.java |  27 ---
 .../ConfigPathUnrecognizedExceptionHandler.java|  44 -
 .../ConfigurationValidationExceptionHandler.java   |  50 -
 .../InvalidConfigFormatExceptionHandler.java   |  43 -
 .../exception/handler/package-info.java|  23 ---
 .../configuration/ConfigurationChangerTest.java|   2 +-
 .../ConfigurationPresentationTest.java |   2 +-
 .../validation/ValidationUtilTest.java |  11 +-
 .../ConfigurationControllerBaseTest.java   |  31 +--
 .../internal/rest/configuration/TestFactory.java   |   2 +-
 modules/rest-api/pom.xml   |  50 +
 .../internal/rest/{api => }/RestFactory.java   |   2 +-
 .../ignite/internal/rest/api/ErrorResult.java  |  65 ---
 .../ignite/internal/rest/api/InvalidParam.java |  72 +++
 .../apache/ignite/internal/rest/api/Problem.java   | 209 +
 .../internal/rest/api/ValidationProblem.java   | 111 +++
 .../ignite/internal/rest/constants/HttpCode.java}  |  50 ++---
 .../ignite/internal/rest/constants/MediaType.java} |  25 ++-
 .../exception/handler/IgniteExceptionHandler.java  |  72 +++
 .../ignite/internal/rest/problem/Builder.java} |  12 +-
 .../rest/problem/HttpProblemResponse.java} |  39 ++--
 .../handler/IgniteExceptionHandlerTest.java|  91 +
 modules/rest/openapi/openapi.properties|  19 ++
 modules/rest/openapi/openapi.yaml  | 121 +++-
 modules/rest/pom.xml   |   4 +-
 .../apache/ignite/internal/rest/RestComponent.java |   1 -
 .../org/apache/ignite/internal/app/IgniteImpl.java |   2 +-
 .../configuration/ColumnTypeValidatorImpl.java |   4 +-
 .../configuration/KnownDataStorageValidator.java   |  12 +-
 .../schema/configuration/TableValidatorImpl.java   |   6 +-
 .../ExistingDataStorageValidator.java  |  14 +-
 .../PageMemoryDataRegionValidatorImpl.java |  21 ++-
 .../RocksDbDataRegionValidatorImpl.java|  12 +-
 52 files changed, 1097 insertions(+), 465 deletions(-)

diff --git 
a/modules/cli/src/integrationTest/java/org/apache/ignite/cli/call/configuration/ItShowConfigurationCallTest.java
 
b/modules/cli/src/integrationTest/java/org/apache/ignite/cli/call/configuration/ItShowConfigurationCallTest.java
index 786fd8dd5..a19f5182c 100644
--- 
a/modules/cli/src/integrationTest/java/org/apache/ignite/cli/call/configuration/ItShowConfigurationCallTest.java
+++ 
b/modules/cli/src/integrationTest/java/org/apache/ignite/cli/call/configuration/ItShowConfigurationCallTest.java
@@ -68,7 +68,7 @@ class ItShowConfigurationCallTest extends 
CallIntegrationTestBase {
 // Then
 assertThat(output.hasError()).isFalse();
 // And
-assertThat(output.body()).isEqualTo("\"lru\"");
+assertThat(output.body()).isEqualTo("lru");
 }
 
 @Test
diff --git 
a/modules/cli/src/integrationTest/java/org/apache/ignite/rest/ItGeneratedRestClientTest.java
 
b/modules/cli/src/integrationTest/java/org/apache/ignite/rest/ItGeneratedRestClientTest.java
index d0a041643..4e969eefc 100644
--- 
a/modules/cli/src/integrationTest/java/org

[ignite] branch ignite-2.13 updated: IGNITE-17284 Fix supported thin client features list on documentation (#10127)

2022-07-01 Thread mmuzaf
This is an automated email from the ASF dual-hosted git repository.

mmuzaf pushed a commit to branch ignite-2.13
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.13 by this push:
 new c94e2d6a0da IGNITE-17284 Fix supported thin client features list on 
documentation (#10127)
c94e2d6a0da is described below

commit c94e2d6a0daf8aa60642f1f8ad467f9341bc55e9
Author: Maxim Muzafarov 
AuthorDate: Fri Jul 1 12:18:47 2022 +0300

IGNITE-17284 Fix supported thin client features list on documentation 
(#10127)

* IGNITE-17284 Fix supported features list on documentation

* IGNITE-17284 Fix review
---
 docs/_docs/thin-client-comparison.csv | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/docs/_docs/thin-client-comparison.csv 
b/docs/_docs/thin-client-comparison.csv
index bf5eb80e049..8044052d1d0 100644
--- a/docs/_docs/thin-client-comparison.csv
+++ b/docs/_docs/thin-client-comparison.csv
@@ -3,15 +3,17 @@ Scan Query,{yes},{yes},No,{yes},{yes},{yes}
 Scan Query with a filter,{yes},{yes},No,No,No,No
 SqlFieldsQuery,{yes},{yes},No,{yes},{yes},{yes}
 Binary Object API,{yes},{yes},No,No,{yes},{yes}
+Failover,{yes},{yes},{yes},{yes},{yes},{yes}
 Async Operations,No,{yes},No,{yes},{yes},{yes}
 SSL/TLS,{yes},{yes},{yes},{yes},{yes},{yes}
 Authentication,{yes},{yes},{yes},{yes},{yes},{yes}
 Partition Awareness,{yes},{yes},{yes},{yes},{yes},No
-Failover,{yes},{yes},{yes},{yes},{yes},{yes}
-Transactions,{yes},{yes},No,No,No,No
+Transactions,{yes},{yes},{yes},No,No,No
 Cluster API,{yes},{yes},No,No,No,No
-Compute,{yes},{yes},No,No,No,No
+Compute API,{yes},{yes},{yes},No,No,No
+Continuous queries,{yes},{yes},No,No,No,No
 Service invocation,{yes},{yes},No,No,No,No
 Server Discovery,No,{yes},No,No,No,No
 Server Discovery in Kubernetes,{yes},No,No,No,No,No
-Continuous queries,{yes},{yes},No,No,No,No
\ No newline at end of file
+Data Streamer,No,{Yes},No,No,No,No
+Retry Policy,{yes},{yes},No,No,No,No
\ No newline at end of file



[ignite] branch master updated: IGNITE-17284 Fix supported thin client features list on documentation (#10127)

2022-07-01 Thread mmuzaf
This is an automated email from the ASF dual-hosted git repository.

mmuzaf pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 930ab400373 IGNITE-17284 Fix supported thin client features list on 
documentation (#10127)
930ab400373 is described below

commit 930ab400373fa1ed3b1de6dc88fc98d95115b48d
Author: Maxim Muzafarov 
AuthorDate: Fri Jul 1 12:18:47 2022 +0300

IGNITE-17284 Fix supported thin client features list on documentation 
(#10127)

* IGNITE-17284 Fix supported features list on documentation

* IGNITE-17284 Fix review
---
 docs/_docs/thin-client-comparison.csv | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/docs/_docs/thin-client-comparison.csv 
b/docs/_docs/thin-client-comparison.csv
index bf5eb80e049..8044052d1d0 100644
--- a/docs/_docs/thin-client-comparison.csv
+++ b/docs/_docs/thin-client-comparison.csv
@@ -3,15 +3,17 @@ Scan Query,{yes},{yes},No,{yes},{yes},{yes}
 Scan Query with a filter,{yes},{yes},No,No,No,No
 SqlFieldsQuery,{yes},{yes},No,{yes},{yes},{yes}
 Binary Object API,{yes},{yes},No,No,{yes},{yes}
+Failover,{yes},{yes},{yes},{yes},{yes},{yes}
 Async Operations,No,{yes},No,{yes},{yes},{yes}
 SSL/TLS,{yes},{yes},{yes},{yes},{yes},{yes}
 Authentication,{yes},{yes},{yes},{yes},{yes},{yes}
 Partition Awareness,{yes},{yes},{yes},{yes},{yes},No
-Failover,{yes},{yes},{yes},{yes},{yes},{yes}
-Transactions,{yes},{yes},No,No,No,No
+Transactions,{yes},{yes},{yes},No,No,No
 Cluster API,{yes},{yes},No,No,No,No
-Compute,{yes},{yes},No,No,No,No
+Compute API,{yes},{yes},{yes},No,No,No
+Continuous queries,{yes},{yes},No,No,No,No
 Service invocation,{yes},{yes},No,No,No,No
 Server Discovery,No,{yes},No,No,No,No
 Server Discovery in Kubernetes,{yes},No,No,No,No,No
-Continuous queries,{yes},{yes},No,No,No,No
\ No newline at end of file
+Data Streamer,No,{Yes},No,No,No,No
+Retry Policy,{yes},{yes},No,No,No,No
\ No newline at end of file



[ignite] branch master updated: IGNITE-17272 Fix logical recovery of encrypted caches (#10122)

2022-07-01 Thread ibessonov
This is an automated email from the ASF dual-hosted git repository.

ibessonov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new 277fbb2234a IGNITE-17272 Fix logical recovery of encrypted caches 
(#10122)
277fbb2234a is described below

commit 277fbb2234a86c14f5e660ec8dfbedcee1540bd2
Author: Alexander Polovtcev 
AuthorDate: Fri Jul 1 11:41:23 2022 +0300

IGNITE-17272 Fix logical recovery of encrypted caches (#10122)
---
 .../internal/pagemem/wal/record/WALRecord.java |   4 +-
 .../wal/serializer/RecordV2Serializer.java |  36 ---
 .../cache/mvcc/CacheMvccTxFailoverTest.java|   4 +-
 .../db/IgniteLogicalRecoveryEncryptionTest.java| 114 +
 .../wal/AbstractWalDeltaConsistencyTest.java   |   4 +-
 .../cache/transactions/TxStateChangeEventTest.java |   4 +-
 .../testframework/junits/GridAbstractTest.java |  36 +++
 .../H2DynamicColumnsAbstractBasicSelfTest.java |  22 ++--
 .../IgnitePdsWithIndexingCoreTestSuite.java|   2 +
 9 files changed, 174 insertions(+), 52 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
index fe3f1965478..c726ee24766 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/WALRecord.java
@@ -205,7 +205,7 @@ public abstract class WALRecord {
 MVCC_DATA_PAGE_NEW_TX_STATE_HINT_UPDATED_RECORD(51, PHYSICAL),
 
 /** Encrypted WAL-record. */
-ENCRYPTED_RECORD(52, PHYSICAL),
+ENCRYPTED_RECORD(52, MIXED),
 
 /**
  * Ecnrypted data record.
@@ -242,7 +242,7 @@ public abstract class WALRecord {
 OUT_OF_ORDER_UPDATE(62, LOGICAL),
 
 /** Encrypted WAL-record. */
-ENCRYPTED_RECORD_V2(63, PHYSICAL),
+ENCRYPTED_RECORD_V2(63, MIXED),
 
 /**
  * Ecnrypted data record.
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV2Serializer.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV2Serializer.java
index 35a89477e68..f2c8b7f50d5 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV2Serializer.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV2Serializer.java
@@ -37,9 +37,12 @@ import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.lang.IgniteBiPredicate;
 
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType;
+import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.ENCRYPTED_RECORD;
+import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.ENCRYPTED_RECORD_V2;
 import static 
org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.SWITCH_SEGMENT_RECORD;
 import static 
org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordV1Serializer.CRC_SIZE;
 import static 
org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordV1Serializer.REC_TYPE_SIZE;
+import static 
org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordV1Serializer.readRecordType;
 
 /**
  * Record V2 serializer.
@@ -72,15 +75,8 @@ public class RecordV2Serializer implements RecordSerializer {
 private final boolean skipPositionCheck;
 
 /** Thread-local heap byte buffer. */
-private final ThreadLocal heapTlb = new 
ThreadLocal() {
-@Override protected ByteBuffer initialValue() {
-ByteBuffer buf = ByteBuffer.allocate(4096);
-
-buf.order(GridUnsafe.NATIVE_BYTE_ORDER);
-
-return buf;
-}
-};
+private final ThreadLocal heapTlb =
+ThreadLocal.withInitial(() -> 
ByteBuffer.allocate(4096).order(GridUnsafe.NATIVE_BYTE_ORDER));
 
 /**
  * Record type filter.
@@ -107,7 +103,7 @@ public class RecordV2Serializer implements RecordSerializer 
{
 ByteBufferBackedDataInput in,
 WALPointer expPtr
 ) throws IOException, IgniteCheckedException {
-WALRecord.RecordType recType = 
RecordV1Serializer.readRecordType(in);
+RecordType recType = readRecordType(in);
 
 if (recType == SWITCH_SEGMENT_RECORD)
 throw new SegmentEofException("Reached end of segment", null);
@@ -119,8 +115,22 @@ public class RecordV2Serializer implements 
RecordSerializer {
 ", expected pointer [idx=" + expPtr.index() + ", offset=" 
+ expPtr.fileOffset() + "]");
 }
 
-if (recType.purp